Skip to main content
Question

Using attribute name in HTTPCaller Request URL

  • January 30, 2019
  • 1 reply
  • 47 views

Forum|alt.badge.img

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.

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.

1 reply

david_r
Celebrity
  • 8394 replies
  • January 30, 2019

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)}