AnsweredAssumed Answered

Populate current field based on previous answer...sometimes

Question asked by wws_ahargreaves on May 3, 2018
Latest reply on Aug 13, 2018 by wws_ahargreaves

Hello James Tedrick, Ismael Chivite,

I am attempting to create the following calculation:

  • If the value of {CANNOT_LOCATE} is set to 'YES' then set my current field to 'UNKNOWN'.
  • If the value of {CANNOT_LOCATE} is set to 'NO' then don't pre-populate my current field and let the user choose from the list of choices.

I can achieve the first part using:

if(selected(${CANNOT_LOCATE}, 'YES'), 'UNKNOWN','')

However, if the value of {CANNOT_LOCATE} is set to 'NO' the value chosen for my current field is considered ineligible and gets the strike through as it's not ' '. So, I tried the following:

if(selected(${CANNOT_LOCATE}, 'YES'), 'UNKNOWN',if(selected(${CANNOT_LOCATE}, 'NO'), 'NO',''))

This works, and even if I change my current fields value from "NO" to something else on the choice list it's accepted. However, it does pre-populate my current field with a "NO" meaning a user could technically skip over this field. I'd much prefer to leave my current field BLANK if the value of {CANNOT_LOCATE} is set to 'NO'.

 

Any advice?

Outcomes