Creating an AppSheet email bot, I used the below in the email body (per AppSheet documentation here) :
<b>Date: </b><<[Date]>>
<b>Title: </b><<[Title]>>
<b>Notes: </b><<[Notes]>>
The email received displays the column name, as below, without their values:
Date: <<[Date]>>
Title: <<[Title]>>
Notes: <<[Notes]>>
Using the below content for the email body (per AppSheet documentation here) returns the "Unable to find column 'X'" for each column:
<b>Date: </b><<[Date]>>
<b>Title: </b><<[Title]>>
<b>Notes: </b><<[Notes]>>
Which documentation is correct and how do I fix this? Thanks.
Solved! Go to Solution.
Your suggestion of using the symbols ("<<" and ">>") and applying the LOOKUP function as illustrated here by another forum member, and pasted below, resolved the problem .
If it helps anyone else, the expression template and expression applied are below.
Template to LOOKUP the last row in "My Table" (i.e. MAX(My Table[_ROWNUMBER]) and return the value of "Wanted Column" in that _ROWNUMBER:
LOOKUP(
MAX(My Table[_ROWNUMBER]),
"My Table",
"_ROWNUMBER",
"Wanted Column"
)
The correct email body setting for the most recent row's "Date" column is set as:
<b>Date: </b><<LOOKUP(MAX(Entries[_ROWNUMBER]),"Entries","_ROWNUMBER","Date")>>
Thanks.
You are simply filling out the "email body" field in the Task config? The latter one is correct. The former is for an html template file I believe.
As for the "unable to find..." error. My guess is that you're using a scheduled bot, instead of a data-change or forEveryRow bot. Is that correct? If you're wanting to output the values from a single record in your email, you'd need one of those other types. You haven't described what you're trying to do so I can't really help any more than that.
https://help.appsheet.com/en/articles/4865307-appsheet-automation-the-essentials
Thanks for the tips and link. Yes, I'm using the "email body" field for a task to send daily emails of certain columns of the last row, i.e. the prior day.
Could you elaborate on sending a single record in the daily email for this task?
Your suggestion of using the symbols ("<<" and ">>") and applying the LOOKUP function as illustrated here by another forum member, and pasted below, resolved the problem .
If it helps anyone else, the expression template and expression applied are below.
Template to LOOKUP the last row in "My Table" (i.e. MAX(My Table[_ROWNUMBER]) and return the value of "Wanted Column" in that _ROWNUMBER:
LOOKUP(
MAX(My Table[_ROWNUMBER]),
"My Table",
"_ROWNUMBER",
"Wanted Column"
)
The correct email body setting for the most recent row's "Date" column is set as:
<b>Date: </b><<LOOKUP(MAX(Entries[_ROWNUMBER]),"Entries","_ROWNUMBER","Date")>>
Thanks.
Good job. LOOKUP certainly works. If you have more than a few columns to display, I'd personally use a START expression to move into the context of the single record just once, then you can simply pull the columns with simpler syntax of just <<[column]>>
I've looked at the START documentation and haven't nailed the expression yet. Could you point out how to apply it here to get the last row's date?
START:LIST(MAXROW(
User | Count |
---|---|
36 | |
31 | |
28 | |
23 | |
18 |