Question

For the ArcGISOnlineConnector transformer, how do I dynamically access the Group ID chosen as the content source parameter by the user?

  • 5 April 2023
  • 1 reply
  • 2 views

Badge +1

I have an ArcGISOnlineConnector transformer at the beginning of my workspace (initiated by a single Creator object), and the Content Source is set by the user as a group in an ArcGIS Online (AGOL) portal. When the workspace is run, the output from the ArcGISOnlineConnector is a collection of definitions for feature services, web maps, etc. within that chosen group. Those definitions and their attributes are exactly what I need for the main operation of the workspace; however, during processing (within a PythonCaller, to be specific) I need dynamically to access the Group ID parameter that was chosen in the transformer by the user. How can I do that programmatically?

 

In the PythonCaller, which leverages the API for Python and the REST API, I generate an Item object (Python API) for each feature service, so I could use that Item object as a starting point for finding the group id. I have used fmeobjects a lot--but my breadth of knowledge of classes, methods, etc. is rather small--so there may be some help hiding there. Of course, I also have all of the output attributes from the ArcGISOnlineConnector transformer. I just don't know how to go further with getting the group id ... or even if it is possible.


1 reply

Userlevel 3
Badge +17

Hello @tcrossman​ 

Apologies for the delayed response! It should be possible to get the value of the ArcGISOnlineConnector's Group ID parameter by creating a user parameter for this parameter and then using fme.macroValues['_FME_GROUP_ID'] to access the value of this parameter in a PythonCaller.

Reply