[_THISROW] in nested start expression

Cathal_Noone
Participant III

If I have nested start expressions in a template, does the THISROW expression change to the the row selected in the start expression once it hasnโ€™t reached the END expression or does it always refer to the row that triggered the template?
For example in the below, does the _THISROW in the second start expression refer to โ€œProjectDetailsโ€ row selected or the same row that the _THISROW in the first start statement points?

<<Start: Filter("ProjectDetails", [StartDate] > [_THISROW].[Date])>>
             ........
              
             <<Start: Filter("ProjectActivities", [ProjectID#] = [_THISROW].[Project Name])>>
                     ........
             <<End>>

 <<End>>
Solved Solved
0 6 751
1 ACCEPTED SOLUTION

Hello @Cathal_Noone, first let me show you the best explanation there is for [_THISROW], it applies to both regular expressions and workflows.

By looking at the masterfully explained diagram, we can see that [_THISROW] is always going to refer to the origin row.

View solution in original post

6 REPLIES 6

Hello @Cathal_Noone, first let me show you the best explanation there is for [_THISROW], it applies to both regular expressions and workflows.

By looking at the masterfully explained diagram, we can see that [_THISROW] is always going to refer to the origin row.

Cathal_Noone
Participant III

Thanks a million @Rafael_ANEIC-PY, that is exactly what I was looking for.

Iโ€™m facing the same and I know I could resolve by introducing a new VC that can be consumed by the nested Start but I would rather avoid that if possible.

So Iโ€™m curious how you solved this problem?

If you have a look at Rafaels post the solution is in the attached FAQ. Essentially, use [_THISROW-1] to go up one level to the previous start, [_THISROW-2] to go up 2 levels, etcโ€ฆ

Ah, I didnโ€™t quite gather thatโ€™s what you needed. I have a different need. Iโ€™ll continue searching and open a Question if I canโ€™t find the answer. Thank you for the response.

For some strange reason, my problem was solved by using [_THISROW-1]. Let me explain my scenario:

I was looking for getting a running total in my email template and I didn't want to use Virtual Columns for getting running totals as it cripples the loading time. My data was sorted in reverse chronological order, hence all I had to do is to filter the rows that are before the current row and take the sum. I was frustrated with [_THISROW] and after reading this post I realized that it is not going to work. I expermented with [_THISROW-1] and it gave me the desired result. 

Top Labels in this Space