I'm going through some courses at AppSheetTraining.com and in the current lesson, they use [_THISROW-1] in a document template. They explain that the minus one takes the expression back to the previous context, in this case, the Employee table.
I feel like something is not quite clicking for me to fully understand [_THISROW-1], and was hoping someone could perhaps this use case in a different way. My assumption is that in the previous <<Start>> statement, the context was the Employee table, but at the same time, the first use of [_THISROW-1] is before the initial <<Start>> statement terminates, it's inside a TemplateIf statement.
[_THISROW-1] is used again in another <<Start>> statement, but given the above paragraph, i have confused myself as to why and when one would use [_THISROW-1], and what exactly it's doing
On my last live stream, I actually started demoing how to build a nested start template like that - but faced technical difficulties towards the end that prevented me from finishing. Despite the fact that I wasn't able to finish, there's some good tidbits of helpful info in there nonetheless.
One of the tidbits is an explanation of the difference between [_Thisrow-1] and [_ThisRow]
I also found out that [_THISROW-1] doesn't work with nested <<START...>>> in the same table in Google Doc template
@sak wrote:
in the same table in Google Doc template
Really?
I can see how this might get confused, as we are expecting:
And if you had
It might get confused... but I would think it wouldn't matter... that it would be driven by the -N and the fact that we're inside X layer already.
Can you describe your scenario where this didn't work?
Hi,
Sorry for the late reply. Based on this example table. If I use [_THISROW-1] in Query 3, it will refer to the Query 1, not Query 2.
thank you both, @Steve and @MultiTech !
I tried searching for [_THISROW-1] but may have mistyped or something, who knows. At any rate, i am glad to have some stuff to read and watch to help solidify this concept.
Seems like it can get to be a bit difficult to keep up with where you are when working with templates.
Wouldn't it be something if the expression assistant and/or AppSheet Toolbox extension could talk to a Google sheet or doc and help with crafting those things?
Wishful thinking.
@mykrobinson wrote:
Wouldn't it be something if the expression assistant and/or AppSheet Toolbox extension could talk to a Google sheet or doc and help with crafting those things?
Wishful thinking.
1 year later, totally possible! ๐ค๐ง ๐ช
I've been working on an Ai assistant project centered around my AppSheet build methodologies (code name Appster) when I have a spare moment, and while it doesn't have the ability to read from your document... you can just as easily copy your template formula into the formula space I've provided - and it'll help you find the solution.
Fun how things evolve over time. (^_^)
User | Count |
---|---|
18 | |
15 | |
10 | |
7 | |
4 |