Grouped list from one table

Many app users have asked how to group the list on a Workflow/Template when the data is coming from one table only. Unfortunately we don’t have that functionality at this moment, but this sample app shows how you can do that. For this purpose you need one virtual column but other functionalities are done on the Email Body. The method works with the template as well.

Trick is not the virtual column’s formula. The trick is coming from the combination of virtual column’s appformula and Workflow rule. The virtual column is:

SELECT(Data[ID],[NAME]=[_THISROW].[NAME])

… and the general syntax for the formula on Workflow is:

<<Start: SELECT(Data[ID],[ID]=INDEX([GROUP],1))>><<[NAME]>>
<<Start: [GROUP]>><<[LOG]>>
<< End >>
<< End >>

https://www.appsheet.com/samples/How-to-create-a-grouped-list-for-email?appGuidString=dc56c835-a5f6-4433-9a80-d02e7bb0330d

9 Likes

Thank you for sharing great tips @Aleksi

Simple set up, do great stuffs.

The key essense of this trick appears to be template expression of ; -

This outer select expression, most importantly the part of

should yield the one row key value representing each different group and pulling the one row per group dynamically.

Then render [Group] fields which is already Listing up the set of row associated to each group.

I would say super clever, beautifully simple.

2 Likes

Good way to do this.
Here are some other ways:

4 Likes

Hi, I was trying to look up the sample app, but did not work .

Is there any error ? I mean, I literally add some rows, and the data erase after save it.

Regards,

That’s how sample apps work, no data is ever saved.

3 Likes