I have a flow where there are four checkboxes in a screen but one of them is conditionally rendered. That checkbox has its "Default Value" set to {!$GlobalConstant.False}, but that assignment appears not to be made unless the checkbox is rendered.

So later on in the flow when that checkbox is assigned to a checkbox record field an error results because null is being set rather than false:

assignment screen shot

with debug output of:

acl__AccreditedInvestorIndividualItemD__c {!AccreditedInvestorIndividualItemD} (null)

Accredited Investor Individual Type D: value not of required type: .

What pattern can be used to avoid this problem?

  • 2
    I think you can create a formula that would take the value of the checkbox and default to false if no value is found and then use that in your assignment
    – Novarg
    Aug 3, 2023 at 14:01
  • Hi @Novarg, You mean a formula SObject field? I'd like to fix this in the flow if possible.
    – Keith C
    Aug 3, 2023 at 14:03
  • 1
    Hi @Novarg, I see the Formula resource type now in the flow editor. Yes I'm a newbie to flows. Thanks!
    – Keith C
    Aug 3, 2023 at 14:06
  • 1
    Hi @Novarg post this as an answer and I'll accept it so we can close this Q/A off.
    – Keith C
    Aug 3, 2023 at 15:31
  • 2
    If a screen input component is hidden because it doesn’t meet conditional visibility requirements, its value is set to null. ... SFDC Help
    – cropredy
    Aug 3, 2023 at 16:26

1 Answer 1


In your screen flow you can go to the toolbox(on the left) and click 'New Resource':

enter image description here

Then create a new resource of type formula that would evaluate to true only if the checkbox is checked:

enter image description here

Then you can use this formula in your assignment and it should be either true(only if checkbox was checked) or false(all other scenarios)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .