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
Dhanalakshmi RaajasekarDhanalakshmi Raajasekar 

Hi, Please help me to solve this

In screen flows, I have two fields in account like reading 1 and reading 2, The requirement is that they can enter either reading 1 or reading 2 but not both Value and must be greater than zero “0” . I want vaidation on the screen flow. Plase help me to sort this
Best Answer chosen by Dhanalakshmi Raajasekar
Naveen KNNaveen KN
If these two fields are already added to the account record page, I would recommend implementing the validation directly in the Validation Rule of an account (on create/update of the account record.) 

Considering you have not added it in the account and added these fields in the screen flow and getting inputs from the user...

Add decision element

Check 1

CR1: Reading 1 is Not Null = True 
CR2: Reading 2 is Not Null = True

(CR1 AND CR2) 

connect Screen flow with error:  can enter either reading 1 or reading 2 but not both 

Check 2

CR1: Reading 1 is Not Null = True 
CR2: Reading 2 is Not Null = True
CR3: Reading 1 < 0 
CR4: Reading 2 < 0 

(CR1 AND CR3) OR (CR2 and CR4)

connect Screen flow with error:  must be greater than zero “0”


 

All Answers

Naveen KNNaveen KN
If these two fields are already added to the account record page, I would recommend implementing the validation directly in the Validation Rule of an account (on create/update of the account record.) 

Considering you have not added it in the account and added these fields in the screen flow and getting inputs from the user...

Add decision element

Check 1

CR1: Reading 1 is Not Null = True 
CR2: Reading 2 is Not Null = True

(CR1 AND CR2) 

connect Screen flow with error:  can enter either reading 1 or reading 2 but not both 

Check 2

CR1: Reading 1 is Not Null = True 
CR2: Reading 2 is Not Null = True
CR3: Reading 1 < 0 
CR4: Reading 2 < 0 

(CR1 AND CR3) OR (CR2 and CR4)

connect Screen flow with error:  must be greater than zero “0”


 
This was selected as the best answer
Naveen KNNaveen KN
correction: 
CR3: Reading 1 <= 0 
CR4: Reading 2 <= 0