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
David PoynterDavid Poynter 

NEED HELP - How to use flows to update all contacts that have a zip code longer than 5 digits. All is working except I cannot figure out a way to use quicklookup to find contacts with a zip code longer than 5 digits!

I have created a visual flow that collects all contacts that meet certain requirements, stores them in a sObject collection, preforms functions on the data in zip codes fields to shorten them to the first five digits, saves them in a new sObject collection, and then updates them all at once. 
This works perfectly if I preform the first lookup with either the specific contact ID, or using "Starts with" and then the correct first 5 digits of their zip code. 
HOWEVER, this flow is only useful if it works by automatically recording ALL contacts that have a zip code longer than 5 digits and then preforming the tasks just on those contacts. 

HOW can I do this? I can use 
-Equals
-Does not equal
-contains
-starts with
-ends with
-is null

PLEASE ADVISE 
Best Answer chosen by David Poynter
David PoynterDavid Poynter

No it does not. What I ended up doing is just ran a report with ALL zip codes, then made my code alter the zips for all contacts with a zip code that started with the 5 digits I promted for including a dash. I then ran it many times each time putting in the starting of local zip codes. If somebody has a way of fixing this, and it automatically running on any contact that has a longer zip than 5 digits, PLEASE still reply. 

Thanks!

All Answers

Parker EdelmannParker Edelmann
If you want, you could create a checkbox formula field that looks something like this:
LEN(ZipCode) <> 5 && !ISBLANK(ZipCode)

You can then look up all Contacts where this checkbox is true and update them. Would this work for you?
David PoynterDavid Poynter

No it does not. What I ended up doing is just ran a report with ALL zip codes, then made my code alter the zips for all contacts with a zip code that started with the 5 digits I promted for including a dash. I then ran it many times each time putting in the starting of local zip codes. If somebody has a way of fixing this, and it automatically running on any contact that has a longer zip than 5 digits, PLEASE still reply. 

Thanks!

This was selected as the best answer