Formatting a Web Service request

I’m working with a web service request that I can’t seem format into a dataset. I’m using Sepasoft’s Web Service Module and Ignition 8.0.

Printing the results returns the following.

Trying to drill down to the results, I try the following:
print wcSetup.getChild(‘ExecuteDataSourceResponse’).getChild(‘ExecuteDataSourceResult’).getChild(‘ResultSets’).getChild(‘ResultSet’)

The results to this are below:

I’m not sure what to do next. Could anyone offer any suggestions?

Very much appreciated!



Personally, I like using a python dictionary to drill down into child elements.
This function is how you do it:

From there you can loop through your list of results and reference the fields you want to pull out.

If more help is needed, feel free to schedule a time with us here:
Design Consultation

Thanks! I’ll give that a try

It seems like this is the correct path, but I’m unable to map the Name with a dataset header and the Value to its cell. I’ve tried the following:

Here are the results:
[{u’Columns’: {u’Column’: [{u’Name’: u’Job_No’, u’Value’: 45558}, {u’Name’: u’Part_No’, u’Value’: u’800228-B’}, {u’Name’: u’Part_Revision’, u’Value’: u’B’}, {u’Name’: u’Part_Name’, u’Value’: u’GMX351 - Global Wet Side Absorber’}, {u’Name’: u’Job_Op_No’, u’Value’: 10}, {u’Name’: u’Job_Op_Color’, u’Value’: u’#D2F3CF’}, {u’Name’: u’Operation_Code’, u’Value’: u’Die Cut / Inspect & Pack’}, {u’Name’: u’Standard_Quantity’, u’Value’: 120}, {u’Name’: u’Standard_Container_Type’, u’Value’: u’’}, {u’Name’: u’Workcenter_Status_Color’, u’Value’: u’#03fa03’}, {u’Name’: u’Workcenter_Status_Description’, u’Value’: u’Production’}, {u’Name’: u’Conatiner_Serial_No’, u’Value’: u’’}, {u’Name’: u’Container_Status’, u’Value’: u’’}, {u’Name’: u’Container_Status_Color’, u’Value’: u’’}, {u’Name’: u’Logged_Operators’, u’Value’: u’test, user|’}, {u’Name’: u’Workcenter_Code’, u’Value’: u’E31 Bruno 3’}, {u’Name’: u’Part_Key’, u’Value’: 7371644}, {u’Name’: u’Part_Operation_Key’, u’Value’: 18048360}, {u’Name’: u’Operation_Key’, u’Value’: 31957}, {u’Name’: u’Shift_Group’, u’Value’: 1}, {u’Name’: u’Allow_Production’, u’Value’: u’’}]}}]

@jesse.records could you help me with this loop? This request only has a single row but I know we will need this for much larger datasets.

I need the dataset to look like this:

Thank you very much!


Ok I see what you are trying to do here.

Take a look at this video: 6.6.3: Scripting in Web Services: Parsing wsVariables | Sepasoft MES Solutions

You might revert back to your method of using getChild() then call toDataset() on the child (wsVariable) you wish to parse to an Ignition dataset: - MES Platform 3.0 - Sepasoft MES Help Documentation

Otherwise, you can loop over the key:value pair as a dictionary and build one yourself if you needed to build a subset of the data returned.



Thank you! I’ll try this tonight.