Skip to main content

Long time listener, first time caller.

Newish to FME and was attempting to use a user parameter for the first time to allow the user to input the number of days they need to pull data.

 

I have the parameter and the initial formula working fine. DaysPulled is my user parameter:

 

@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P$(DaysPulled)D),%Y%m%d)

 

The problem I'm running into is later on in the flow I need to use that user input and add a number to it, effectively turning the user parameter into DaysPulled +1 and DaysPulled+2. I've been beating my head against the wall trying to modify DatePulled using add, sum, +1, etc and can't find the right format to get what I need.

 

Example of failed attempt.

@DateTimeFormat(@DateTimeAdd(@DateTimeNow(),-P@add(1,$(DaysPulled))D),%Y%m%d)

 

Can anyone point me towards a solution?

Hi @dpenland​ Parameter values are set before the translation starts and can't be modified later. At some point you'll have to convert DaysPulled to an attribute or else set the value of a new attribute to be something like $(dayspulled) + 1, etc.


Reply