Get tabledata from ui_table through ui-table handler

I have tried to follow this discusion Get data from ui_table, to get an array from the ui-table

But the handler reply this error when I send "getTable" to it:

16/02/2023 19:32:43node: handle tableDatafunction : (error)
"TypeError: Cannot set properties of undefined (setting 'tableArray')"

Any idea what going on ?

I use a version of @Christian-Me UI table handler, I say version as I think there may be more than one flow in circulation.

There is no command msg.payload.command="getTable" in the version I use.

So if you also have a similar version the command will not work.

However you should be able to get the table data from the context store.

Works here, have you set the index for your table data index (my example id) property?


Thanks for your answers
I had import the example from @Christian-Me to understand how it works:
https://raw.githubusercontent.com/Christian-Me/remote-device-table/master/table-handler-demo-01.json

@smcgann99 in my version the command exist:

if (command==="getTable") {
msg.payload.tableArray=;
tableArray=msg.payload.tableArray
}

@E1cid: I set the id as you did, same result.


Could you pass me your simple example to check on my side ?

To large to paste , here is a download
flows.json (42.7 KB)

Thanks you very mutch @E1cid , it seems to work on my side. I get the table from second connector. thanks.

But Since I had imported your flow, I have two ui-table handler available in the nodes list.

image

And both are differents, differents options.
There is one that doesn't respond to the gettable and the other yes.

@E1cid with your flow I can't have event when a cell is changed from the ui (option "editor": "input").
Also, in the array send by the gettable request, it haven't been update with the new modifications made from ui. it send the original table.
if I modifiy the value of a cell, the handle doesn't take in account, It look like the the table node and the handler aren't linked, how I can set the handle to get table with modified values when I request a a gettable ?

I did edit the handler I sent you, but just removed some syntax errors, functionality is as before.

How do you send updates from the ui, example please.

The table and handler are not link if you want to update the table you need to feed the update into the handler.

With the attached flows
flows.json (48.9 KB)
You can modify temperature or voltage values from the ui. If I modify a cell there's no update on the table connector.

Your table data has no index property which may be an issue.

I haven't used these nodes in a while but if i remember correctly you send

{
  payload : { 
    command:" "string",
    arguments: [[{row objectt}]]
  }
}

Sorry the example was wrong, I modified it with the index.
flows.json (49.0 KB)
Then in this exemple you can modify the cells from the ui.

Nothing come out the output connector of the table node ("send data on click" is enable). Do you know how I can set this table node to get modified value on output connector when one or several cells are modified from the ui ?

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