Need a special offer?Find out if your project fits.
+

How to apply a condition in calculated values?

Answered
Vladimir asked on March 5, 2021

Hello! 
For example i got Country code as string (example: AF AG AR)
Also i got Cost column 
I want for to apply a  condition: if(Country code == AF, Cost*2)
The issue is that it applies Cost*2 for all Cost column. I want it only to row where country code is AF 
Calculate individual values doesnt work for it.
How can i do this?

Attachments:
123456.PNG

3 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster March 5, 2021

Hello, Vladimir,
 
Thank you for writing to our forum.
 
Please kindly note that only number comparison is currently supported in calculated values. Our team suggests changing the Country code column to a numeric one. For example, replace "AF" with 1, "AG" with 0, and "AR" with 2. This would allow using the newly created column in conditions. 
 
Please let us know if any further questions occur.
 
Kind regards,
Tanya

Public
Vladimir March 11, 2021

Hello!
Thank you! It worked.
How can I convert string value to Int in calculated values?
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 15, 2021

Hi Vladimir,
 
Thank you for your swift response.
 
There isn't any built-in functionality that would convert your string fields to numbers for calculated value formulas.
 
As a workaround, you could top up your data set with a separate field containing the numbers you can use for calculated value formulas.
 
We hope this helps.
 
Best regards,
Mykhailo

Please login or Register to Submit Answer