How can I access the [row_key] that fired a specific PDF_creation for scheduled reports inside start: expressions?
I run a scheduled report for each row in table (+condition) I can access the values of the row that invoked the PDF_Creation by using [_thisrow].[row_key] but when I use start: expressions [_thisrow].[row_key] now refers to the table that is used inside the start.
How can I select the [_invoking_row_key] inside of Start: expressions?
@Jonas I thought that you have ref between 2 tables, therefore I proposed that. Without a ref, may be you can fetch the ID with ANY(SELECT(…)) expression. But of course this will only work if you have some kinda connection (not ref) between 2 tables.
You wrote “How can I access the row of “monthly_drivers” that triggered the workflow inside the start: expression? [_THISROW].[month] does not work since it looks inside of “tours” instead of “monthly_drivers””.
Actually, when [_THISROW] appears inside a Start expression like the one below, it refers to the current row of “monthly_drivers”. Admittedly, the term [_THISROW] is a
bit confusing, but it is referring to the current row of the table containing the Start expression. That is “monthly_drivers” in your example.
To verify this, I did the following: 1. I created two tables that contain the fields listed in your image.
I created a Report for table “monthly_drivers” that specifies “For each row in table”.
I created a Body template that contain the test template shown below.
The Start: SELECT expression condition I specified is not realistic, but it confirms that [_THISROW] is referring to the current row of “monthly_drivers” and that it retrieves the value of the “month” field in that row.
Forgive me if I have misunderstood what you are reporting. If so, please do the following:
Create an simple sample app that illustrates the problem. 2. Provide me with: 2a. Your account id from the Account pane 2b. The app name 2c. The steps to reproduce the problem.
If you want to refer to fields in the parent record from within the embedded template of the child record, the child record must contain a Ref field that refers to the parent record.
In your case, you need a Ref in the “tours” table that refers to the parent record in the “monthly_drivers” table.
If that Ref field was called “monthly_driver-ref”, then within the embedded template for the “tours” table you could access the “is_ready” field in “monthly_driver” by specifying:
[monthly_driver-ref].[is_ready].
[_THISROW] is only defined within the right hand side of the SELECT expression where it refers to the parent record.
[_THISROW] is not defined within the embedded template. As you noted, specifying [_THISROW].[is_ready] will not return the value of the “is_ready” field in the parent record in the embedded template.
Instead, you need to use a dereference expression like [monthly_driver-ref].[is_ready].
In a SELECT expression, the table you specify in the first part of the SELECT (in this case “B[keyB]”) determines which table is the current table in the second part of the SELECT expression.
For example, if you want to refer to a field in B in the second part of the SELECT expression, you simply specify the field name from B. In the example above I refer to [SomeFieldInB].
If you want to refer to a field in A in the second part of the SELECT expression, you specify [_THISROW].[SomeFieldInA]
SELECT and FILTER are special because the first part of the SELECT picks the table that is used as the default table throughout the second part of the SELECT expression. In the second part of the SELECT expression [_THISROW] is used to refer “up to the parent table”.
@Levent_KULACOGLU@Philip_Garrett_Appsh thank you for your answers. I understand the select() and how I can use table A & B to connect within that statement. My scenario is that I want to get the specific row that invoked the PDF.
Please check out these 2 attachments, they are a bit simplified but visualize the situation.