Open sidd-harth opened 5 years ago
I am also faced this query. any one give a tips or suggestions regards this.
Try this,
let appName, status, podIP, version;
let rows = [];
for (var i = 0; i < data.length; i++) {
appName = data[i].appName;
version = data[i].version;
status = data[i].status;
rows.push([appName, version, status]);
}
conv.ask('Here is your table');
conv.ask(new Table({
dividers: true,
columns: ['appName', 'version', 'status'],
rows: rows,
}));
@sidd-harth It's not working. I also not able to find the Table card code in the src folder.
I am working on DialogFlow and able to use both
SimpleResponse
andTableCard
response.This is my
SimpleResponse
working code, well I am returning a very huge(200+ character)text
message and a lot of it is static text. So I want to make use of Table card.This is my code for Table card, I will be getting 5 to 7 elements from
for-loop
and I can't figure out how to use these values in the table rows and how to get dynamic rows based on number of elements fromfor-loop
.I tried using
con.ask(Table)
inside for-loop, but that was a bad idea I guess. Moreover we cant have multipleconv.ask tables
.Is this even possible? I see some Dialogflow apps with big tables, are those tables hard-coded or is the data dynamically inserted?