Question

Using attribute name in HTTPCaller Request URL

  • 30 January 2019
  • 1 reply
  • 3 views

Badge

I have an unconventional excel spreadsheet where the first column is a work order number and the subsequent columns are employee names. Below each employee name are the hours they spent on each work order. See below:

 

 

The goal is not only to use the value of an attribute column but also the attribute name (in this case the employee name) in a httpcaller without transposing/pivoting. So in theory the Request URL in a HTTPCaller would have the following format:

https://***BaseAddress***/addcost?data={"WorkOrderID":@Value(Work Order ID),"Employee":"AttributeName","Hours": AttributeValue}

 

I've yet found a function to extract the attribute name. The text editor only allows me to extract the value of the attribute. I'm unsure how to accomplish this.

 

Any recommendations is greatly appreciated.


1 reply

Userlevel 4

You could look into maybe using the AttributeExploder (keep attributes = yes) and then filter away the feature where _attr_name = "Work Order ID". The URL might look something like

https://***BaseAddress***/addcost?data={"WorkOrderID":@Value(Work Order ID),"Employee":"@Value(_attr_name)","Hours": @Value(_attr_value)} 

Reply