I am doing an email template a scheduled event that runs daily.
I want to return a list of people who were added that day. It’s an absenteeism app, for reference, and I want to include a list of people who called in sick for a specific team.
Using the List function, I am able to return a list of people but they all show one on line separated by commas.
<<LIST(SELECT(Name of Table[Column], ([Condition Column] = “Value I want to filter on”)))>>
What I really want is each person to show on their own row. And ultimate goal is to have them show in a table, each person on their own row, next column being the type of absence, and the next the # of hours they missed.
Doing a bunch of reading and searching, it seems a start expression might solve for this? But I have been unsuccessful writing a formula for a start expression with a condition. It is only one table, and I could only find mention of reverse reference virtual column which doesn’t apply.
I have tried:
<<Start:[Column], [Column Condition] = “Value I want to filter on”>> <>
and
<<Start:(SELECT(Name of Table[Column], ([Column Condition] = “Value I want to filter on”)))>> <>
Both do not work.
Note I am also unclear where to put the “End” close so I have it in the same row like this:
Couple notes - YES I’m changing table name and column and such to the actual values, I just work for an organization where I can’t share our data publicly.
And I haven’t even touched absence type or hours because I wanted to get the team member piece working. I’ve learned the templates just don’t send if they’re not right, so I take it step by step so I know exactly where I broke it.
Any guidance you can give me would be great. If i can achieve this with another formula I’m all ears too.
Here’s what you are missing. A START expression is wanting a List of key values, identifying any number of records on a single Table. A typical way to generate such a List of key values, is to use SELECT() or FILTER().
Note that FILTER() is just a special case of SELECT(), which automatically chooses the key column in the Table, i.e. FILTER( Table, condition )
is equivalent to SELECT( Table[key-colum] , condition)
. The majority of the time, you’ll probably want to use FILTER in a START expression, for this reason, but a SELECT() is not wrong as long as you specify the key-column.
So your first expression is definitely not correct:
Your second here is very close:
…as long as [Column] is the key-column for that Table. But better/more clear would be:
<<START: FILTER( Name of Table, [Column Condition] = "Value I want to filter on" ) >>
Your <<END>>
expression should be moved to here:
And an additional side-note:
…your usage is LIST() here is completely unnecessary. SELECT() already returns a List.
And as always, make sure to review the appropriate help docs, multiple times.
Thanks Marc! Getting closer for sure. Using your formula it added 8 rows to my table (and there are 8 instances), but it doesn’t actually put any information in those rows.
I think what’s missing is specifying what column I want it to populate in the row?
The value I want to filter on is the team they’re on, but the text I want it to populate in the table is the Team Member name.
So I if Jane and Sally are on Team A, and Bob and Joe are on Team B, I want only Team A to show up here, so Jane and Sally on their own row.
Where do I specify what column I want it to return?
It’s funny about the list() comment because I literally copied it off a help document right in Appsheet lol. But good to know!
Right. So the START expression just tells the template which records to iterate over. Within each record, you still need to enter which column values to display. You need to add something like this, between the START and END.
What? Where?
You saved the day! Thank you so much.
Turns out you saved the day for me almost a year ago too so double thank you for always helping me out
I’ll try to find the list thing, I definitely didn’t come up with it on my own. I had so many help articles open though so I’ll see if I can get back to it.
Have a great day!
If you can point me to the doc, I can fix it.
Well now I’m on a mission!
I’ll report back.
User | Count |
---|---|
14 | |
11 | |
9 | |
7 | |
4 |