• Tim Lomison 6
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
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:
  • 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 TRUEResult: Good.
Solution #1:
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. 
Soltuion 2 - this is CRAZY
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 1 - FIELD HIDDEN - SENDS EMPTY STRING
User-added image

SCREEN SHOT 2 - FIELD SHOWN, BUT BLANK - SENDS FALSE

User-added image

Here's the "Make Known" criteria in the screen.
User-added image


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 am a bit of a beginner at formulas, so hopefully one of you will think this is easy, and be able to help. :-)

 

Customer requirement:

 

Create a formula field that displays the Week Number (as Week 1, Week 2, etc), based on the Date entered on a particular record (same object).

 

Ex: 01/01/09 - 01/04/09 would return a value of "Week 1"  

01/05/09 - 01/11/09 = Week 2

01/12/09 - 01/18/09 = Week 3

 

and so on.....

 

Is using the CASE function the way to go, and if so, what's the shortest way to create this formula?

 

Thank you in advance!

S

 

  • April 20, 2009
  • Like
  • 0