assign-if function

Assign a values to a variable for instances where a condition is met