Reputation: 1877
If there is a variable ${var}
I want to set its value to 0 if its current value is None otherwise leave the current value unchanged.
I understand it should be very easy but some how I am having trouble in verifying the recipe.
Upvotes: 1
Views: 98
Reputation: 1575
You can use the keyword Set Variable If
${Var}= Set Variable If '${Current_Value}'=='None' 0 ${Current_Value}
Upvotes: -2
Reputation: 385970
You can use Set variable if, and give the current value as the second value:
${var}= Set variable if $var is None 0 ${var}
Upvotes: 3