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
Deanna Aaron 11Deanna Aaron 11 

Auto update an address to reflect the correct P.O. Box format

Hi,

I want the billing street field to update "P.O. Box" if it is incorrectly formatted-- Similarly to how the phone number field auto-updates to the correct format (xxx)xxx-xxxx.

Background: As a nonprofilt, donors enter their information on our website and these records push to Salesforce as Opportunities.

We want the data in Salesforce to be consistent. Is there a formula I could use in a workflow to say:

IF the "Street Address" field contains...

PO Box 
Po Box
P.o. Box
po box
p.o. box
po Box
p.o. Box
PO BOX
P.O. BOX

(OR in between each)

THEN update to "P.O. Box"? That said, I don't want the address to get overwritten from
po box 1322 to P.O. Box

We somehow have to maintain the remaining numbers. Also, if there's a way I can apply this to other address names, that would be very handy. Example: st to St.

Challenge: If someone has "st" in the street name, it'll update incorrectly -- red star lane > red St.ar lane. Could I use the criteria of (SPACE)St(Space) - this way it won't change a word containing "st"

Thank you for your help.
RD@SFRD@SF
Hi Deanna

Apart from the PO box number what else might also be present in the billing street field?