Dynamic Data Tables lookup with API:

I want to do a dynamic Data Tables lookup with API:
/api/v2/flows/datatables/{datatableId}/rows/{rowId}?showbrief=false

I Got a respons 200 OK with data:
{
"Init Queue Message": "Du stilles i kø, vent venligst",
"Queue Message 1": "Husk I kan oprette ticket direkte i ServicesNow",
"Queue Message 2": "kø 2",
"Adhoc Queue Message": "Problemer med MitID",
"key": "+4578*******"
}
My problem is the Output contact how to define it because it empty.

I like to make a collection I can split in my queue flow and assign it to variable like this.
Flow.InitQueueMsg=
Flow.QueueMsg1=
Flow.QueueMsg2=
Flow.AdhocMsg=

Why do I want to do this?
Because the customer has many divisions, and the manager of the division can change the data tables of the division If I do the normal “Data Tables lookup” in the flow I need to a switch to split out to the hard code “Data Tables Lookup”.
And if the customer makes a new division, we also must rebuild the flow and test it again.

Hi,
If you have different fields in different data tables, you can try this:
{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "{"ROW": "$esc.jsonString(${rawResult})"}"
}

And then parse JSON in the Architect flow.

Hi Irina

I try it but got this error

Hello,

You can use the following Output Contract.
Note that if you have already published your Data Action, you will not be able to modify the contracts. You will need to create a new Data Action (contracts cannot be changed after being published once).

{
  "type": "object",
  "properties": {
    "Init Queue Message": {
      "type": "string"
    },
    "Queue Message 1": {
      "type": "string"
    },
    "Queue Message 2": {
      "type": "string"
    },
    "Adhoc Queue Message": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

With the following Response Configuration:

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

Regards,

Hi,
I didn't pay attention that slashes were not copied. Should be like this:
image

Thanks Irina

This is exactly the solution that I want.
It provides flexibility and is easy to maintain when scaling the system.

Thanks for the help