Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Phone Numbers in Formula

reginawhelan
8 - Asteroid

I am creating a flow that validates data. I am having a hard time with the Phone Number. I will explain the steps in my flow (in regards to the phone number):

 

1. I'm using a Multi-Field formula to remove any "NULL" text (data that has been entered as NULL and replacing it with Nothing/Blank). Formula: IF [_currentfield_] = "NULL" THEN "" ELSE [_currentfield_] ENDIF. This is working great for the other 79 columns.

 

2. I want to default any blank fields within the phone number column with (000)000-0000. I am using a Formula function: IF [Phone Number] = null() THEN "(000)000-0000" ELSE [Phone Number] ENDIF

 

Only the fields that were blank are populated with the default phone number ((000)000-0000), any that were text entered ("NULL") and now Blank are coming back with nothing.

 

I've tried changing the Type within the Select function but none of them are giving me the desired results.

 

Can someone please help me?

 

 

2 REPLIES 2
JosephSerpis
17 - Castor
17 - Castor

Hi @reginawhelan try this syntax for

 

1. IF [_currentfield_] = "NULL" THEN Null() ELSE [_currentfield_] ENDIF.

2. IF [Phone Number] = null() or [Phone Number] ="NULL" THEN "(000)000-0000" ELSE [Phone Number] ENDIF

reginawhelan
8 - Asteroid

I took the NULL replacement out of the Multi-Field formula and added your suggestion and it worked...Thank you!

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels