REST Activity to Collect Outstanding Tasks
Hello, I am trying to use the REST service to return JSON of a list of all outstanding tasks for a user. I am using this: https://documentation.agilepoint.com/11/developer/restmethodGetWorkListByUserID.html
I pass it my username and status = assigned. It currently returns two outstanding tasks which is correct. I set it to Map Response to Process Schema
I mapped the Response_Data_Array to ParsedData which is a ComplexType string that is repeatable. Each of the other fields are mapped to ParsedData's children which are just Elements, strings, and are not repeatable.

I have an email that runs after and the idea was to email a user of all outstanding tasks they had. Right now it only outputs 1 task in table format when using this command:
$XMLREPEATING2HTML(${/pd:AP/pd:processFields/pd:ParsedData~})

I've also tried mapping it to the ParsedData parent/children and then using a loop to append each result to one variable so that variable can be outputted to an email.

Set scoped variable: EmailBody = "<table border='1' cellpadding='5' cellspacing='0'><tr><th>ID</th><th>Application</th><th>Due Date</th><th>Status</th></tr>"

Inside the loop:

After exiting the loop:

and then I try to output emailBody to an email. The table headers show fine but I cannot get the data to show.
I've been working on this for quite a while. I thought it would be easier to output an API call with multiple instances to a variable or an email.
What is also aggravating is that when I go to view the app runtime, I am able to see where both sets were returned correctly and if I click to expand them, you can clearly see the data in each

I would appreciate immensely any help you could offer.
Please sign in to leave a comment.
Comments
1 comment