Split an array into their own rows on a spreadsheet

Hello,, my first post and the first time I am working with AppSheet.

I have an app which will store highlights from a darts match.

There are two tables, Highlights and Players. Players contain player name, id and division. Highlights pulls id, player name, date and writes in a highlight in one row in the highlights table.

The user enters in a players ID# and the app looks up the players ID and returns the players name and their division and stores the date. User then enters the highlight. This  gets written into our highlights sheet as a row that contains: Players ID#, Players Name, Date and their highlight. This currently works entering only one highlight then repeating the process for the player if that player has multiple highlights. 

I want to be able to enter multiple highlights either 1 or up to 12 separated by a comma. 

The Highlight type is TEXT and I created a virtual column "HighlightList" of type list which has this expression: SPLIT([Highlight], ",")

I have an action and call that action from an automation bot.

Action: "AddRowsFromList" Data: Add a new row to another table using values from this row, In set these columns I set the ID and the date and in the highlight column I use this expression to try and get each of those multiple highlights in their own row. INDEX([_THISROW].[HighlightList], 1) then I repeat set ID, set date, INDEX([_THISROW].[HighlightList], 2).... I only have up to 3 to test but would like up to 12 in case someone has a real good night.

In the automation bot I have event, data change, Adds Only, Table=Highlights, then under run this process I have: Run a data action (AddRowsFromList)

It is not working and only writes the whole list on 1 row: EXAMPLE: 121, 5 bulls, c7, 170 out.

You see the values are neither text nor numbers exclusively.

Any help would be greatly helpful ๐Ÿ˜„

InfoDarts

0 1 208
1 REPLY 1

If I understand your requirements correctly, here is what I propose you try..

Create AddRowFromList_1 thru AddRowFromList_12. (I was not sure if you have done this already. If so fine.). The expression INDEX([_THISROW].[HighlightList], 1) with the corresponding index value to set the Highlight column should be OK. I also set the behavior of each action as ISNOTBLANK(INDEX([_THISROW].[HighlightList], 1)).

For the bot's action use the Grouped Action and choose all 12 of the actions. (I have only created 3 actions for testing myself). An event on Adds Only should also work.

TeeSee1_0-1705912770496.png

TeeSee1_2-1705913509632.png

Here, source_list is a comma separated text column. split_items is a VC with SPLIT([source_list], ",").

TARGET is the table to add rows, each corresponding to the items in the VC.

XFER_ALL is a grouped action to run all of the add actions manually but it's not necessary in your case if you are using a bot to handle that.

Hope this is what you are looking for.

 

Top Labels in this Space