Get Row id from row creation DataTable

Hey,

I'm trying to get the row id of a datatable after creating it (to be able to update it later in the same call flow, where i'm calling the action.).

I'm using /api/v2/flows/datatables/{datatableId}/rows to create the new row. How can i sort as an output, the id of the row ?

Thanks !

Hello,

The rowId corresponds to the value you have set for the "key" column/attribute (key, KEY or Key - not case sensitive), when adding the new row.
So you should be able to get this row Id without having to sort/parse your output.

If you need to parse/process your Data Action output to get the rowId (the key) as an output parameter, you can set a "key" output variable in your Output Contract:

{
  "type": "object",
  "required": [
    "key"
  ],
  "properties": {
    "key": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

And keep the standard Response Configuration:

{
  "translationMap": {},
  "translationMapDefaults": {},
  "successTemplate": "${rawResult}"
}

Regards,

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.