Expand my Community achievements bar.

Do you have questions about the migration to Adobe Business Platform? Come join our upcoming coffee break and ask away!

IF Statement Issue with Custom Fields

Avatar

Level 7
Hello, I am trying to put together an IF statement directly in a report column. I am trying to say "IF my custom field "Will this event be one day or multiple days" is equal to "One Day", then show "1". Otherwise, show the value in the custom field "How many days will this event be." I wrote this expression, but it's only returning different values for the "Will this event be one day or multiple days" field: IF({DE:Will this event be one day or multiple days?}=One Day, "1",{DE:How many days will this event be}) Any insight as to what I'm overlooking? Linnie Ciepielowski Esri
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Level 6
It looks like you may simply be missing quotes around the One Day value. Justin Renteria SSFCU

Avatar

Level 7
I tried with and without the quotes; it is still not working. Very strange. Linnie Ciepielowski Esri

Avatar

Level 10
I think it's going to go something like this: IF({your custom field}="your value", CONCAT "what you want it to say instead",{other custom form field value}) In other words, you might be missing a concat. I would definitely break it down and try a simpler calculation first: like "if your custom field is that value, do something simpler" and see if you can get a simple statement to work. Then build up to the additional "do something else". This really helps me with troubleshooting where my problem was. -skye

Avatar

Level 10
Nevermind, I played around with it, and your formula should work with quotes. i.e. IF({DE:custom field name}="your value","1",{DE:custom field name}) should work. Can't think why it would not, unless your case is off anywhere (i.e. if the actual answer was "One day" and you typed in "One Day", that would provide a null result. Similarly for your custom field names. It's all case sensitive, or like if you had a double space accidentally entered into anywhere) -skye

Avatar

Level 6
Have you tried it with no quotes around the "1"? Also, I have no idea if this is the case, but is the Calculated Field {DE:How many days will this event be} returning a text/string value while the other's returning a number value? Or vice versa? I don't know if that causes problems in Workfront like it does in Tableau. Vincent Goodwin The Capital Group Companies