basenine 11/21/2022 5:08:04 PM Hello Robert, If the API call is going to something like Xero (where an order with items can be POSTed to create an Invoice), you can: > Create an Array in the Line Items table (using a Formula - Text field)...like "{"& '"Description": "'&List(" ",[FIELD NAME],[FIELD NAME],[FIELD NAME])&'", '& '"Quantity": "'&Format([QTY])&'", '& '"UnitAmount": "'&JSONFormat([COST])&'", '& '"TaxType": "OUTPUT"'&', '& '"LineAmount": "'&JSONFormat([TOTAL COST])&'", '& '"AccountCode": "200"}'
>Make a summary of this field in the Order Table with a match condition of Items you wanted to select. >Use this summary field in the API body and place it in the "LineItems:" array... "LineItems":[ { "Description": "COULD BE ANYTHING GOES HERE....COULD BE NOTHING (IF NOTHING, DELETE EVERYTHING BETWEEN AND INCLUDING "{},")" }, <%=[LineItemArray]%> ]
I hope this helps...and that I'm not barking up the wrong tree, too 🙂
|