Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

I need to add an "=" to the end of the field if an "=" does not already exist

bh1789
8 - Asteroid

I have a field of data that needs to end with an =

sometimes the data comes through without the =

the field can be different lengths

 

for example here is a field with an = at the end

KamJOVCRBWqqQlWlB16aQZpKc6w=

 

in this example, there is no = but I need to add an = at the end

khZgNJQWegMisCbODHshBSNh3yM

 

 

Thank you for any help, much appreciated!

 

6 REPLIES 6
Felipe_Ribeir0
16 - Nebula

Hi @bh1789 

 

You can use this formula

if Right([Field1], 1) != '=' then [Field1] + '=' else [Field1] endif

 

Felipe_Ribeir0_0-1670513248771.png

 

ShankerV
17 - Castor

Hi @bh1789 

 

One way of doing this.

 

ShankerV_0-1670513398728.png

 

Input was:

ShankerV_0-1670513489116.png

 

 

bh1789
8 - Asteroid

Thank you very much!

bh1789
8 - Asteroid

One more question, is there a way to to formula you provided to not add the = when the field begins with "ECW"?

Felipe_Ribeir0
16 - Nebula

Hi @bh1789 

 

Try this formula

if Right([Field1], 1) != '=' and left([Field1], 3) != 'ECW' then [Field1] + '=' else [Field1] endif

 

Felipe_Ribeir0_0-1670518354398.png

 

bh1789
8 - Asteroid

Thank you very much!

Labels