Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
alexis
Partner - Specialist
Partner - Specialist

String concatenation in variable declaration

Hi

I'm trying to create a variable that looks at the current year and month to decide on the content based on the simple rule:

So far I have

SET ThisYear = Year(Today());

SET ThisMonth = num(Month(Today()));

SET ThisFY = '=if($(ThisMonth)>6, $(ThisYear)+1, $(ThisYear))';

This works great - it returns 2018 for Jan-June 2018,  2019 for July-Aug 2018

I want to create a variable that will contain the value FY18 or FY19 in the above scenario.

I have tried variants of:

SET ThisFY_Full = 'FY' & right('$(ThisFY)',2);

and nothing seems to work - can someone help out.

I'm sure this is very simple - it's just that I am not achieving it.

Thanks in advance

Alexis

1 Solution

Accepted Solutions
sunny_talwar

Try this

SET ThisYear = Year(Today());

SET ThisMonth = num(Month(Today()));

LET ThisFY = if($(ThisMonth)>6, $(ThisYear)+1, $(ThisYear));


LET ThisFY_Full = 'FY' & right('$(ThisFY)',2);

View solution in original post

2 Replies
sunny_talwar

Try this

SET ThisYear = Year(Today());

SET ThisMonth = num(Month(Today()));

LET ThisFY = if($(ThisMonth)>6, $(ThisYear)+1, $(ThisYear));


LET ThisFY_Full = 'FY' & right('$(ThisFY)',2);

alexis
Partner - Specialist
Partner - Specialist
Author

Thanks Sunny

I was close but not close enough!!