Ui-table for one id multi columns

I want to create a table like this following one and using this ui-table https://flows.nodered.org/node/node-red-node-ui-table.

image

My JSON Data looks like this:

[
{"ID":"02","Username":"anhtu","Email":"abcde@gmail.com","Location [KeyID, Fieldname]":"[[{"KeyID":"fhDortmund","FieldName":"Sonnenstr"}],[{"KeyID":"klinik","FieldName":"bereich2"}],[{"KeyID":"klinik","FieldName":"bereich1"}]]"},
{"ID":"01","Username":"anhtugmx","Email":"newabc@gmx.de","Location [KeyID, Fieldname]":"[[{"KeyID":"fhDortmund","FieldName":"Sonnenstr"}],[{"KeyID":"klinik","FieldName":"bereich1"}]]"}
]

Any suggestion will be really appreciated.

do you want to input data from the dashboard or do you want to show your table on the DB?

Hi, I get the JSON Data from database and want to show it in table on dashboard.

if you want to show empty fields you can simply, pass an empty string at that point.
you would have to multiply dortmund TU and dortmund FH to a new arrayindex where username and email is empty.

how safe are you with programming js, iterations over arrays, objects. /basic coding stuff?

Actually, I am newbie with JS. My main job is embedded software with C/C++ or Python. I got your idea but I suddenly think, maybe I need to use usename and email to delete/edit data in database. Is there any way to hide username and email?

sure!

use a function node, pass your data in create a new array, delete username and email.
the point is: ui table node will only accept arrays with a depth of "1"
so you would need to extract the data you want to show from the array in "location".
the syntax is basicly the same as in C.

ui table wont let you do hide and so on
you would need a button on the dashboard that goes into a function node, which than will operare over your data somehow and sends the new prepared data to the ui table node.

actually what you are planning is not difficult, it just needs some effort.

maybe you can describe more clearly what you exacly want to do and we^ll work things out.
sort by/ hide/ show which data exactly/......

greetings from TU Darmstadt BTW :wink:

1 Like

Thank you, my buddy. I already got my idea :blush:
Liebe GrĂĽĂźe aus TU Dortmund :wink:

1 Like

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