Check out the Event Management guide, it has information about the use of formulas. Here is what it says about "If" functions:
If-Then Construct (IF)
The function syntax is IF(B, X, Y). If B is greater than zero, it returns the value of X. If B is less than or equal to zero), it returns the value of Y and does not evaluate X. You can use other terms, formulas, or expressions, for B, X, or Y. If B is undefined (no value is assigned) it is treated as zero and returns Y.
Thanks for your answer, actually I check this documentation , but what they mention only works for numerical fields,
my question would be more related for "text" fields !!!
do u have any idea ?
I have some ideas, but can you more fully describe the use case you are trying to solve? Give me more realistic scenario you are trying to accomplish.
thanks for your prompt response.
Please keep in mind that the challenge is to find the right sintaxe for "TEXT" field.
for example having bellow the NCM as "NUMERIC" field the correct sintaxe would be :
so the formula above is working perfectly
but my target is to make the same in case of NCM became a "TEXT" field, so the question is, how would be the correct sintaxe :
Im tried for both of them and did not work !!
Do you have any idea ??
1 of 1 people found this helpful
If you want to use a question with a text answer type to drive a formula then you'll need to provide a restricted range of possible responses and then map those reponse onto numeric values for use in the formula. It's not feasible to do it for a text question with a free form answer as far as I know.
To achieve this you need to edit the question and do the following:
a) set the 'include in cost' attribute to 'custom'
b) set the 'acceptable values' to 'list of choices'
c) when you add the choices at the bottom of the screen you should see a section that allows to map each one to a numeric value for use in formulas
d) refer to the numeric value in the if statement in the formula (although maybe you don't need an if statement when you already have a numeric value to work with, it's not really clear from your post)