How to retrieve data from the data table in Dialog Task

Hi,

Greetings for the day…!!!

I am new to Kore.ai, Currently trying to develop a sample application.

Requirement: I am planning to retrieve data from the data table in Dialog Task. From data table, I have a Employee ID , Employee id needs to be verified with the User Input.

Things I did:
I have added data table, table view and App.
FYI,

Data Table:

Table View:

Apps:

Dialog Task:

Here in Dialog Task at Service node I am unable to get the data firstly.

Is this correct I am doing or can you please suggest how to work with the Data tables.

Thanks.

Hi @kishore.nellutla,

Once you configure the service node with all the required settings, the data will be retrieved by the service node while executing the dialog task in the chat window.
You can access the data value through context object by using:
{{context.<service_node_name>.response.body.queryResult[].<column_name>}}

https://developer.kore.ai/docs/bots/advanced-topics/data-as-a-service/#Get_Data

You can use the given syntax in a message node or any other node as per your requirement.

Kindly let us know if you still observing the issue even after accessing the data value through the above syntax.

Regards,
Yoga Ramya

Thank You YogaRamya for your kind help. It worked.

Hi, I am trying to create the data table. I wanted to know, What should be the value in [] i.e index if I want to fetch 6 elements from the data and do we need to write the names of all the elements in the data which we want to fetch i.e each column name seperated by .
{{context.<service_node_name>.response.body.queryResult[].<column_name>}}

Thank you in advance.

Hi @meghali.gaikwad,

The “queryResult” in the context object is an array of data-table row values.
You will need to provide the array index value like 0 or 1 or 2 etc in the [] for queryResult as per the respective row value that you would like to retrieve.

Regards,
Yoga Ramya.

1 Like

Thank you Yogaramya.