Filling a V2 table widget from an array

49 views
Skip to first unread message

Steve Waring

unread,
May 25, 2026, 11:59:54 AM (6 days ago) May 25
to Tasker
When my widget is updated, there might be 1, 2, 3, or 4 rows. Is there a way to populate this from the array that holds the data, or do I have to have an if block with four different table widget update statements?

João Dias

unread,
May 25, 2026, 1:28:04 PM (6 days ago) May 25
to tas...@googlegroups.com
Use the Array Merge action to create the array of widget lines for example, and then use that variable in the Widget JSON.

Thank you for your contact.

   Join: connect multiple devices (send pushes, remote SMS, notifications) on Android, Windows, Mac, Linux
   Tasker: customize/automate anything on your phone!
   AutoApps: add advanced functionality to Tasker via plugins

     

João Dias


Steve Waring

unread,
May 26, 2026, 4:15:55 AM (5 days ago) May 26
to Tasker
Many thanks, it did not quite answer what I meant, but I now realise I can use variable join to achieve my aim. Is there any way to escape a comma in a text entry in the table - I assume not.
Once again thanks. 

C-J Solmarken

unread,
May 27, 2026, 12:33:12 AM (5 days ago) May 27
to Tasker
You can define any joiner as you wish under Joiner. If you use | (or any other charachter, even return/line break) you can have commas in the texts.

Steve Waring

unread,
May 27, 2026, 3:56:23 AM (4 days ago) May 27
to Tasker
There does not appear to be a joiner field in the definition of a V2 Table widget. How would you specify this?

C-J Solmarken

unread,
May 27, 2026, 4:38:05 AM (4 days ago) May 27
to Tasker
I meant in the Variable Join action in Tasker. Join the array items with a line break. If the widget treats each line as a row, that should avoid commas being interpreted as separators.

Steve Waring

unread,
May 27, 2026, 8:00:30 AM (4 days ago) May 27
to Tasker
Unfortunately that does not work. For example in a two column table, data "Row1Col1,Row1Col2,Row2Col1,Row2Col2" gives a four cell table (two rows of two columns each). If you change the commas to new-lines, you just get one cell with all the data in it on four lines.

C-J Solmarken

unread,
May 28, 2026, 12:35:18 AM (4 days ago) May 28
to Tasker
I may be misunderstanding your exact setup here. Could you outline how your flow is currently structured (how you're building the array/string before passing it to the V2 table widget)? It would probably make it easier to suggest a workable approach.  

Steve Waring

unread,
May 28, 2026, 7:30:19 AM (3 days ago) May 28
to Tasker
No need even to think about the array. Set up the widget with number of columns=2 and the data as a literal string Fred,Flintsone,Barney,Rubble. You get a four cell table with the first column being the forenames, and the second column being the surnames. Now try and change Fred so that instead of Fred in the first cell you have "Fred, Wilma and Pebbles" in the first cell. As I suspected right at the start, there is no way to put a comma in the text for the cell. 

C-J Solmarken

unread,
May 28, 2026, 8:43:29 AM (3 days ago) May 28
to Tasker
I understand the problem now. I was initially thinking it was easier to add individual items from an array rather than the table parser splitting a single comma-delimited string.

I haven’t looked into this deeply enough, but it should be solvable using a Custom Layout instead of the standard V2 Table. Unfortunately I’ve used Custom Layout too little to say off the top of my head exactly how it would need to be set up, especially if the array can have variable number of items. 
Reply all
Reply to author
Forward
0 new messages