1

I have a Screen Flow API 60 embracing full reactivity. I have a requirement where a user can click Save or Finish while filling out a Form. If they leave the Sample Code empty, Finish is permitted (and no form information is retained), if they populate the Sample Code, all other validations / requiredness attributes must fire.

Since this org is

  1. using Experience Cloud,
  2. has 3 significantly different types of forms where the same fields have different values (using 3 Record Types) and
  3. has complicated field dependencies (using stacked field dependencies 1-3 layers deep) and
  4. has complicated translation requirements (8+ languages)

I have opted to use sObject records displaying the conditionally dependent fields using standard Screen Flow Record Variable Fields and am making the fields required at the field level with n/a options set with Before Save Flows to ensure no impact when the value is not needed. (Where page layout requiredness doesn't care if there is no dependent value, field level requiredness does, so this is annoyingly required until Salesforce permits us to set the field value requiredness of sObject Record Variable fields in Flow Screens).

Setting Sample Code with the following visibility does not seem to respect condition 1 and the value hides when the button is clicked even though there is value in the field (as tested by using display text and testing condition 1 and 2 separately) 1 OR 2

  1. sObject.Sample_Code__c is null FALSE
  2. ButtonBar.value is null TRUE

How can I maintain the current build / complexities and get expected reactivity?

These options did not work in my tests:

  • Formula Boolean HasSampleCode !ISBLANK(sObject.Sample_Code__c) returned FALSE every time (i.e., did not respond to any change to sObject.Sample_Code__c)
  • Formula Text SampleCode sObject.Sample_Code__c returned null every time (i.e., did not respond to any change to sObject.Sample_Code__c)

1 Answer 1

1

For better or worse, the way I was able to get this to work was to have a display element called DisplaySampleForm with text ... that I turned white to match the background. This element utilizes the same visibility criteria I had attempted to use on the sObject.Sample_Code__c field with the difference being that it actually respected the visibility changes:

1 OR 2

  1. sObject.Sample_Code__c is null FALSE
  2. ButtonBar.value is null TRUE

I then added conditional visibility to the sObject.Sample_Code__c field to display as long as DisplaySampleForm IS NULL FALSE

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.