Skip to main content
In this article you show how to create a JSON template from attributes,

 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/jsontemplater.htm

 

 

But I have some values that are in Published Parameters. How would I get those?

 

 

I don't see an XQUERY request for that:

 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#XQuery/XQuery_functions.htm
Hi,

 

Have you tried feaching them with the ParameterFetcher?
The Parameter already exists in the workspace, but I did see that I could use the AttributeCreator and then fill in the value from the Published Parameters. Now my issue (minor) is that the values are all quoted strings, even booleans as well as integer and float values. But it is a minor issue for the Node.JS server that I have written.

 

 


I got an answer from De Wet van Niekerk @ SAFE support:

 

 

This isn't exactly XQuery, but you can use the standard FME macros, such as $(PUBLISHED_PARAM_HERE), and it will work in the JSONTemplater. Here's a screenshot of how it is inserted into the template: http://screencast.com/t/MiKC2GzlU

 

 

 


Reply