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
Claire Sunderland 1Claire Sunderland 1 

Flow get records not returning null value

I have a flow that is assigning a territory based on the billing address information on the account. I have the 'when no records are returned, set specified variables to null' however, when the critera meets a condition in which no record exists it just leaves the existing value and doesn't change it to null.

User-added image
Malika Pathak 9Malika Pathak 9
Hi Claire,

User-added image

User-added image

User-added image

Kindly mark this as best answer, If you find this answer helpful.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Claire,

Can you elaborate with an example to check further and respond.

Thanks.
Claire Sunderland 1Claire Sunderland 1
Hi - Malika I'm not quite following so haven't tried your solution yet.

Anutej yes definitely - example below:
  • I have a custom object called Zip Codes that I look up to in order to determine the territory an address is in. I use this primarily for US zip codes but for ROW territories I just put Countries instead of Zip Codes in the Name field
  • France is owned by Sales Rep A, Japan is not owned by any rep and gets round robined
  • If a record has a country of France, the flow will look up to the Zip Code that matches to France and input Sales Rep A in for the Territory owner
  • If the country on that record was to change to Japan, I want the Territory owner to clear because Japan isn't owned by a specific rep
  • I was thinking it will still go through the flow and when it hits the GetRecord it won't find a record for Japan so it doesn't exist and would change the value to null but instead the field is just staying as Sales Rep A

Does that help? Happy to provide more examples