Email body expression to get LIST of data from multiple rows?

Hi all,

I am creating a shopping list app. I have made a slice view that only shows items with a quantity. Now I want to create an email action to send the full shopping list to myself or my wife However I am struggling setting up the email body template, so it generates the full list of all items from my slice. I can get it to display info from multipe rows using a SELECT function, however I need the email to display both: Category, Item, Unit and Quantity for all items in the list i.e. information from 4 columns, but per row, so the email body would look like e.g.

Diary, Milk, 3 ltr.
Diary, Yoghurt, 2 ltr.
Non-food, toilet paper, 2 pcs.
Non-food, dishwasher tabs, 1 pack
etc.

Any help would be highly appreciated.

Thx

Jannik

0 9 2,597
9 REPLIES 9

You could do that withโ€ฆ

<<SELECT(Table[KeyColumn],TRUE)>>
<<[Category]>>, <<[Item]>>, <<[Quantity]>> <<[Unit]>>
<>

Hi Aleksi,

Thx for your fast reply. I need to select and retrieve data from all rows where value of column โ€œquantityโ€ is higher than โ€œ0โ€. Can you help me build this into the expression below?

Br

Jannik

You could use something likeโ€ฆ
<<SELECT(Table[KeyColumn],[Quantity]>0)>>

Thanks a lot! Iโ€™ll try it put and let you know if it solved my issue.

Br

Jannik

Hi Aleksi,

I could not get your suggestion to work. I am constructing the email body of the Action function: โ€œExternal: Send mailโ€ and not the workflow function for sending mails by schedule. In the Action body I am not able to add fields using <>, <>

The closest I got was this: LIST(SELECT(GOSHOP[Item], [Qty.]>0))
However I need to add also [Category] and [Unit] per item selected. I have spent hours and cannot find a way to add more than one column to the function above.

Hope that you can help me out as this should be a pretty simple taskโ€ฆ

Br

Jannik

May I ask why donโ€™t you use the normal Workflow for this purpose?

Hi Aleksi,

Sure! As I understand normal workflows are scheduled to run at a specified time and cannot be triggered. I need to push the mail. If I can trigger a workflow using an action it could work. Can this be done, you think?

Br

Jannik

Yes itโ€™s possible with the Workflow, not with scheduled reports.

Aleksi is correct.

See topic " Sending Email from an Action Button" in this article https://help.appsheet.com/behavior/workflow-introduction/workflow

Top Labels in this Space