Skip to main content
Question

For loop in FME

  • July 11, 2018
  • 2 replies
  • 112 views

raaaju1990
Contributor
Forum|alt.badge.img+9

I'm accessing an API using FME and trying to fetch records by passing certain ids as a parameter to the API . For example the API is,

https://developers.onemap.sg/commonapi/elastic/omsearch?searchVal=1&returnGeom;=Y&getAddrDetails;=Y

In the above API, I need to keep on increment the value of searchVal=1 from 1 to 100 and then pass each to httpcaller to return the response.

I'm able to do this using python caller and get the response using for loop concept. But, I want to do this without python and use any other transformers which does the trick for me.

Any guidance would be appreciated.

Thanks!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

david_r
Celebrity
  • July 11, 2018

oscard
Influencer
Forum|alt.badge.img+22
  • Influencer
  • July 11, 2018

I would use a Creator with 100 copies.

With AttributeManager I would create a new attribute: searchval = (@Value(_creation_instance) + 1)

The request would be like this:

https://developers.onemap.sg/commonapi/elastic/omsearch?searchVal=@Value(searchval)&returnGeom;=Y?tAddrDetails=Y