Hello,
I was hoping someone can assist. Currently I have a bot generate a pdf and email it weekly. I'm been trying to capture tech notes in the weekly report. What I'm currently doing seems a bit cumbersome. Hoping someone can assist in helping me clean this up.
I have a table Notes with a key column [Note #] (which is generated by a max + 1 expression)
I am using these entries in my pdf template:
<<Select(Notes[Date Time],([Note #] = โ1โ),TRUE)>>
<<Select(Notes[Notes],([Note #] = โ1โ),TRUE)>>
<<Select(Notes[Date Time],([Note #] = โ2โ),TRUE)>>
<<Select(Notes[Notes],([Note #] = โ2โ),TRUE)>>
<<Select(Notes[Date Time],([Note #] = โ3โ),TRUE)>>
<<Select(Notes[Notes],([Note #] = โ3โ),TRUE)>>
<<Select(Notes[Date Time],([Note #] = โ4โ),TRUE)>>
<<Select(Notes[Notes],([Note #] = โ4โ),TRUE)>>
and so on, capped at 20 entries until I add more.
I was hoping someone could help me add an expression like MIN and MIN + 1, MIN + 2... So I can have the most recent note at the top. Alternatively, I have a column [Date Time] which is a DateTime type that maybe I could also use as a Sort type. Lastly, is there any way to write just 1 or 2 lines, and have the formula repeat on it's own? I am trying to avoid listing out this 20 times, as well as, most importantly, not forget to add more lines when I reach 20 notes!
Thanks in advance!
Joe
In general, please try a template expression of
<<START: ORDERBY(Notes[Note #], [Date Time], TRUE)>>
<<[Date Time]>>
<<[Note #]>>
<<END>>
The above expression will list any number of records in descending order by date time.
As a side note, please note that having a serial number system as key is not a recommended practice in AppSheet unless the app is used in a very restrictive environment such as a single user app.
What is a key? - AppSheet Help
You are welcome.
User | Count |
---|---|
41 | |
31 | |
31 | |
16 | |
14 |