Single Formula for Aggregating Rows into JSON Payload

I’m trying to write a formula for a button that sends formatted JSON to a webhook.

I’m really struggling with FormulaMap to cycle throw the rows and using the results using ListCombine

Format(
  '{"Ingest Payload": [{1}]}',
  [MCR-Ingest].FormulaMap(
    Format(
      '{"Table_UID": "{1}", "FilePath": "{2}", "DropBoxFileID": "{3}"}',
      CurrentValue.Table_UID,
      CurrentValue.[Dropbox File Path],
      CurrentValue.DropBox_FileID
    )
  ).ListCombine(", ")
)

As this only outputs the first row.

Dropbox_Ingest_Playground

Hello.

You are using the wrong formula.
The ListCombine function only combine different list into a new list. So you are transforming a 4 element list into a five element list and the Format function is considering only the first element.

You are looking for Join() formula. Just replace the list combine to join and it will work.

Thank you for this! I appreciate you expertise.

For anyone stumbling into this thread with a similar problem, the solution is:

Format(
  '{"Ingest Payload": [{1}]}',
  [MCR-Ingest].FormulaMap(
    Format(
      '{"Table_UID": "{1}", "FilePath": "{2}", "DropBoxFileID": "{3}"}',
      CurrentValue.Table_UID,
      CurrentValue.[Dropbox File Path],
      CurrentValue.DropBox_FileID
    )
  ).Join(", ")
)