You need to sign in to do that
Don't have an account?
Ryan Berens 9
Boolean field in FLOW sends EMPTY STRING when using Conditional Visibility; Need a workaround!
Hi - Trying to meet a requirement in a Flow to remove/show fields with conditional visibility.
I'm running into EXPECTED BEHAVIOR (See article (https://help.salesforce.com/articleView?id=flow_considerations_design_conditional_visibility.htm&type=0)), but I need a workaround.
ISSUE
When a field is HIDDEN on a screen component because of Conditional Visibility, 3 scenarios occur:
Created a Flow FORMULA to evaluate the boolean field - (IF(NOT({!Field}),TRUE,FALSE)
Created a Flow FORMULA to see if the value from the screen field is EMPTY STRING, and if it is, then convert to NULL.
IN SUMMARY:
SCREEN SHOT 2 - FIELD SHOWN, BUT BLANK - SENDS FALSE
Here's the "Make Known" criteria in the screen.
Help! What is the best workaround if you do, in fact, need to make 20+ checkboxes visible or hidden based on 7 distinct use cases?
I'm running into EXPECTED BEHAVIOR (See article (https://help.salesforce.com/articleView?id=flow_considerations_design_conditional_visibility.htm&type=0)), but I need a workaround.
ISSUE
When a field is HIDDEN on a screen component because of Conditional Visibility, 3 scenarios occur:
- Boolean field is HIDDEN, value is FALSE; Flow sends EMPTY STRING. Result: Flow error, data type mismatch
- Boolean field is SHOWN, value is FALSE; Flow send NULL. Result: Good.
- Boolean field is SHOWN, value is TRUE; Flow sends TRUE. Result: Good.
Created a Flow FORMULA to evaluate the boolean field - (IF(NOT({!Field}),TRUE,FALSE)
- Scenario 1: Boolean field on record is TRUE
- Result: INCORRECT field value. Should be FALSE
- Scenario 2: Boolean field on record is FALSE
- Result. Good.
- Scenario 3: Boolean field on record is TRUE
- Result. Good.
Created a Flow FORMULA to see if the value from the screen field is EMPTY STRING, and if it is, then convert to NULL.
Only Scenario: ERROR> Error Occurred: This error occurred when the flow tried to create records: INVALID_TYPE_ON_FIELD_IN_RECORD: Known: value not of required type: . You can look up ExceptionCode values in the SOAP API Developer Guide.
IN SUMMARY:
- I need Conditional visibiliy to meet requirement
- When a field is HIDDEN as expected, it send EMPTY STRING
- When I use formulas to convert it to FALSE, I get two wrong outcomes
- 1: Sets it to the oppositve of the value needed for boolean
- 2: if checking for EMTPY STRING, hits error reflecting wrong data type.
SCREEN SHOT 2 - FIELD SHOWN, BUT BLANK - SENDS FALSE
Here's the "Make Known" criteria in the screen.
Help! What is the best workaround if you do, in fact, need to make 20+ checkboxes visible or hidden based on 7 distinct use cases?
IF({!checkbox.output}, TRUE, FALSE)
All Answers
IF({!checkbox.output}, TRUE, FALSE)
For whatever reason, the "NOT" operator, or using a different evaluation criteria --> IF({!checkbox.output}=TRUE, TRUE, FALSE) both result in incorrect fields value.
I wonder why evaluating just the checkbox provides the correct values, but adding operators to that raw output gets translated incorrectly?? Food for thought.
Formula: IF({!tempCheckboxVar} = "true", TRUE, FALSE)