Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shane_spencer
Specialist
Specialist

Using a different variable in load script depending of field contents

I'm loading data and using Firstworkdate to work out working days.

I've got a number of variables for each Country with list of non working days.

i.e.

$(vHoliday_FR)

$(vHoliday_GB)

$(vHoliday_US)

etc.

I've got a field in my data called COUNTRY with a two letter country code in it for each row. i.e. FR, GB or US etc

What I want to do is use the COUNTRY field to select which variable I use.  How do I do that?

So instead of :

DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_SG) ))

I would have 

DATE( Firstworkdate(Num(ACTUAL_DEADLINE_PAYMENT_DATE_calc),2,$(vHoliday_??) ))

where ?? is the COUNTRY field. Is this possible?

 

 

1 Solution

Accepted Solutions
marcus_sommer

You could try it with something like this:

Firstworkdate(ACTUAL_DEADLINE_PAYMENT_DATE_calc,2,evaluate('vHoliday_' & Country))

- Marcus

View solution in original post

1 Reply
marcus_sommer

You could try it with something like this:

Firstworkdate(ACTUAL_DEADLINE_PAYMENT_DATE_calc,2,evaluate('vHoliday_' & Country))

- Marcus