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:
%repeatOn%"[Record ID#]"%repeatOff%
"123"
%repeatOn%"[Record ID#] and "%repeatOff%
"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:
[
%repeatOn%{
"newStatus": "[Implementation Status]",
"newNote": "[Status Notes]",
"QuoteProdID": "[Id]"
},%repeatOff%
]
[
{
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:
{
"newStatus": "[Implementation Status]",
"newNote": "[Status Notes]",
"QuoteProdID":
[%repeatOn%"[Id]",%repeatOff%]
}
{
newStatus: "Active",
newNote: "foo",
QuoteProdID:
[
1,
2,
]
}
I hope this helps!
Thanks,
------------------------------
Evan Westbrook
PRIME Developer
Harder Mechanical Contractors Inc.
Portland OR
------------------------------
Original Message:
Sent: 08-09-2019 18:56
From: Bo Bedingfield
Subject: Webhook + json issue with multi-record updates
I'm trying to use a webhook to send requests to Microsoft Flow. My webhook works for single record updates, but for multi-record updates it only sends a request for the first changed record.
This section of the QuickBase help documentation seems to apply to my situation, but I can't figure out where/how to syntactically add the %repeatOn% and %repeatOff% instructions.
Here is my original message body that works for single record updates but not for multis:
{
"newStatus" : "[Implementation Status]",
"newNote" : "[Status Notes]",
"QuoteProdID" : "[Id]",
}
I tried adding the repeat instructions here, but it is throwing an error:
{
"newStatus" : "[%repeatOn%[Implementation Status], %repeatOff%]",
"newNote" : "[%repeatOn%[Status Notes], %repeatOff%]",
"QuoteProdID" : "[%repeatOn%[Id], %repeatOff%]",
}
Can anyone help me figure out what I'm doing wrong?