function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Lena RLena R 

How to clear value in previous screen n lightning flows

I'd like to validate a picklist selection in a lightning flow moving from one screen to another. I use a decision and assignment elements for checking a selected value and assigning an error message. If the wrong value is selected, I assign an error message to a text variable and send the user back to the same screen displaying the error message below the picklist field. If the user selects the right value, I assign the variable an empty string and let the user go through to the next screen. However, if the user navigates back to the previous screen the error message is still there although I assigned the variable an empty string. Am I missing something or this works as intended? Ideally, when going back to the previous screen I shouldn't see the error message since it was cleared.

Would anyone suggest how to hide the error message when moving back to the previous screen?