Hello,
id like to implement in my project this
in which node i have to insert?
Now i inserted javascrip code in template node but filter not worked
Thank you very much for your support
Hello,
id like to implement in my project this
in which node i have to insert?
Now i inserted javascrip code in template node but filter not worked
Thank you very much for your support
You can use ui-table. This is based on tabulator. Using ui_control messages you can basically use the full capacity of tabulator.
Perhaps my last answer was a little bit short (posted on the go), sorry for that
What I wanted to suggest. You can place a dropdonw widget as a field selector and type together with an input widget for the value and collect the outputs (perhaps in flow context). A button widget can then send a command to activate the filter function of tabulator:
Example:
The javascript code: table.setFilter("age", ">", 10);
translate to this message to be send to ui-table to activate the filter
{"payload":{
"command":"setFilter",
"arguments":[
"age",
">",
"10"
],
"returnPromise":false
}
}
Note: I have not tested the code.
thank you Christian!
for download command is the same?
i have to do like this
msg.payload={
command:"download",
arguments: ,
returnPromise: true
}
return msg;
?
Sorry I wasn’t notified about your question because you probably did not reply on my message ...
Can you please use the Preformatted text
Function when you post code, this makes it easier to read.
table.download("csv", "data.csv", {delimiter:"."}); //download a CSV file that uses a fullstop (.) delimiter
The download function has one necessary (type) and two optional parameters (filename and options). And no promise. So you are close
Put this into a button widget as payload (JSON)
{
"command": "download",
"arguments": [
"csv",
"table.csv",
{
"delimiter": ";"
}
],
"returnPromise": false
}
Like this node
[{"id":"535ce004.8832e","type":"ui_button","z":"c4712650.59b5e8","name":"","group":"ff9fdb9a.7da098","order":14,"width":"4","height":"1","passthru":false,"label":"Download","tooltip":"click to download","color":"","bgcolor":"","icon":"","payload":"{\"command\":\"download\",\"arguments\":[\"csv\",\"table.csv\",{\"delimiter\":\";\"}],\"returnPromise\":false}","payloadType":"json","topic":"","topicType":"str","x":706,"y":1190,"wires":[["2e6a6379.742abc"]]},{"id":"ff9fdb9a.7da098","type":"ui_group","name":"TEST","tab":"7dcc246f.ee661c","order":1,"disp":false,"width":"8","collapse":false},{"id":"7dcc246f.ee661c","type":"ui_tab","name":"TEST","icon":"dashboard","order":3,"disabled":false,"hidden":false}]
This time the code is tested
Thank you Christian!!!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.