community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

HELP!! Need help with nested left funtion

Meteor

Hi All,

 

Need to return right 4 if length is greater than 4. Please help!! 

 

IF Length([Year of FYE (As adjusted)]) > 4
THEN Right([Year of FYE (As adjusted)],4)
ELSE [Year of FYE (As adjusted)]
ENDIF

 

Thank in advance!!

Alteryx Certified Partner
Alteryx Certified Partner

Hi @AuditPro13 

 

What kind of error are you bumping into?

 

Is your field an Int Number?

If so, you need to use ToString function in combination with a ToNumber function.

 

IF Length(ToString([Year of FYE (As adjusted)])) > 4
THEN ToNumber(Right(ToString([Year of FYE (As adjusted)]),4))
ELSE [Year of FYE (As adjusted)]
ENDIF

Meteor

Hi @Thableaus,

 

The error says "The field "" is not contained in the record. Please noted the data is V_string. 

 

The one you sent is not working currently. 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

@AuditPro13 

 

Oh, you need to give your field a Name in the Formula Tool configuration.

 

fieldname.png

 

 

Cheers,

Pulsar

@AuditPro13 ,

 

I make the same mistake all the time, forgetting to name the field. @Thableaus , good catch!

 

Cheers!

Esther

Meteor

Stupid mistake on my end! Thanks for your help!!

Labels