Skip to main content

Hello,

 

Dynamicly filling the Where Clause in a FeatureReader (Arcgis Online feature Service) only gives an error in Automations.

 

I want to retrieve notifications (meldingen) of the previous month (maand) of the year (jaar) out of Arcgis Online (on a certain point in a month). I want to put this functionality in an Automation.

 

I do this using the following steps:

-In an AttributeManager I take the current DateTime; extract the month and year and calculate the prevous month (use conditional value for use in January).

-This values are put in a privat parameter: Maand (month); JAAR(year)

-The private parameter is then used in the where clause.

EXTRACT(MONTH FROM "REGISTRATIE_DATUM") = $(Maand) AND EXTRACT(YEAR FROM "REGISTRATIE_DATUM") = $(JAAR)

 

This setup works in FME Desktop and on FME Server > (from log)

where 'EXTRACT(MONTH FROM "REGISTRATIE_DATUM") = 7 AND EXTRACT(YEAR FROM "REGISTRATIE_DATUM") = 2021'

 

When putting the Workspace in aan automation it gives an error > (from log)

where 'EXTRACT(MONTH FROM "REGISTRATIE_DATUM") = AND EXTRACT(YEAR FROM "REGISTRATIE_DATUM") = '

The values for Year and Month are not added according to the log.

 

My question is what goes wrong here and why does the Workspace give an error in Automations? Is there an alternative?

 

Regards,

Hello @eisozanstra​ , I think parameters are set before a workspace is run, so I'm not sure the automation can pick up the parameter/attribute value at runtime because it hasn't yet been created yet (in your AttributeManager) (and no parameters can be set once the workspace is running). Does this sound like what you are trying to do?

 

Would you mind providing some information on the following:

 

  1. What type of parameters are you using? (Choice/text/etc.)
  2. Is there a default value set for your parameters?
  3. What version of FME Desktop/Server are you working in?
  4. Would you be willing to share a copy of your workspace?

 

After taking a look at your images/errors, I'm wondering if there may be a better way to approach this. If you aren't comfortable sharing your workspace here, feel free to submit a support case with us. Best, Kailin.


I did submit a support case. Best, Eiso


Reply