Forum Discussion
EvanWestbrook
6 years agoQrew Cadet
Bo,
I found your post when I was trying to figure this out, and I wanted to share my solution.
%repeatOn% and %repeatOff% loops through all records that were updated and applies anything between those values. For example:
If you wanted to send the same JSON object for different records, you could use %repeatOn% and %repeatOff% to build an array of JSON objects:
This would also work for building an array nested inside a JSON object:
I hope this helps!
Thanks,
------------------------------
Evan Westbrook
PRIME Developer
Harder Mechanical Contractors Inc.
Portland OR
------------------------------
I found your post when I was trying to figure this out, and I wanted to share my solution.
%repeatOn% and %repeatOff% loops through all records that were updated and applies anything between those values. For example:
// Sample Data: // Records = 1, 2, 3 // Input 1 %repeatOn%"[Record ID#]"%repeatOff% // Output 1 "123" // Input 2 %repeatOn%"[Record ID#] and "%repeatOff% // Output 2 "1 and 2 and 3 and "
If you wanted to send the same JSON object for different records, you could use %repeatOn% and %repeatOff% to build an array of JSON objects:
// Input [ %repeatOn%{ "newStatus": "[Implementation Status]", "newNote": "[Status Notes]", "QuoteProdID": "[Id]" },%repeatOff% ] // Output [ { newStatus: "Active", newNote: "foo", QuoteProdID: "1" }, { newStatus: "Inactive", newNote: "bar", QuoteProdID: "2" }, ]
This would also work for building an array nested inside a JSON object:
// Input { "newStatus": "[Implementation Status]", "newNote": "[Status Notes]", "QuoteProdID": [%repeatOn%"[Id]",%repeatOff%] } // Output { newStatus: "Active", newNote: "foo", QuoteProdID: [ 1, 2, ] }
I hope this helps!
Thanks,
------------------------------
Evan Westbrook
PRIME Developer
Harder Mechanical Contractors Inc.
Portland OR
------------------------------