I'm trying to only show a component in my lightning screen flow, when a field in my resource is not blank.

Specifically, when the ParentId field of the account returned by the Get Records element is blank. Currently the component is always being shown.

This is the visibility filter I'm trying to use: Component Visibility Settings

I have tried:

  • {!Get_Account.ParentId} Does Not Equal {!$GlobalConstant.EmptyString}
  • {!Get_Account.ParentId} Does Not Equal Null
  • {!Get_Account.ParentId} Does Not Equal ''

None have worked, and the component is always visible.

I've tested the value of the field using Salesforce inspector, and it's definitely blank. Salesforce Inspector value for the ParentId field on the test record I'm using

How can I hide this component?

1 Answer 1


I solved this problem by creating a new variable named VarParentId and assigning it to equal {!Get_Account.ParentId} in a previous step of the flow. I then set the component visibility condition to {!VarParentId} Does Not Equal {!$GlobalConstant.EmptyString} and it is now working correctly, hiding the component when the ParentId is blank.

It seems like this might be an oversight in the automatic record collection variable creation that the flow handles for you when you select 'Automatically store all fields' in the Get Record element. This doesn't always seem to behave like a regular variable.

You must log in to answer this question.

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