Issue with Execute Action on a set of rows - Referenced Rows

I have a simple “execute an action on a set of rows” Action in place with Referenced Rows set as follows:

SELECT(project_plan_template[project_template_id],[project_template_id]=[_THISROW].[template])

The action does not work - doesn’t trigger. But, when the Referenced Rows is set to “project_plan_template[project_template_id]” it works fine - ALL the fields are updated . Unfortunately, I need just records with the particular project_template_id designated in the SELECT statement to be updated.

Note: project_template_id is the key field for the project_plan_template table. Could this be the reason it’s not working? I’ve used Referenced Rows many times and not sure how I should be configuring this?

Thanks so much!

Just to confirm,

[template] is a ref col in the table project_plan that references the [project template id] of the table project_plan_template, correct?

EDITED:

The expression in the referenced rows should return a list of key values. so there is nothing wrong in specifying project_plan_template[project_template_id]

2 Likes

Yes, its the field that indicates which items to select from the project_plan_template table to apply the action to

1 Like

The referenced rows expression in general looks good. You may wish to check in test pane if the expression returns any “Y” values by creating a VC with that expression. This testing will be useful because “project_plan_template[project_template_id]” works fine. So maybe while further qualifying argument is causing an issue of not returning any rows.

2 Likes

Hmmm,

What does your referenced action - set_project_template_to_insert - do?

1 Like

Here is the set action

1 Like

Again just to check,

Since your action is using INPUT function, your calling action should have inputs data like below. I do not see any.

1 Like

Hi Suvrutt, when I click on the test option , there are no records - expression results are blank but when I look at the Test Results table, these are not fields from the project_plan_template table. These appear to be records from the project_plan table

Here is the set_project config. But as a side note: I removed the INPUT option to simplify the testing and still had the same issue - Works only when there are no conditions on the Referenced Rows - even with the INPUT() function in use.

1 Like

I believe, the referenced rows expression should return at least one value as “Y”.

1 Like

There are no “Y’s”

Again, just to be sure your [template] col in the project_plan table contains project_template_id’s, i.e 500001 ~13.

2 Likes

Correct, or is it mix up of key (Template_Id) and label (Template) may be? Is [Template] having template IDs?

1 Like

I have an idea and will reconfigure. Thanks so much!

1 Like

Thank you. Request you to post back with the resolution if possible. Anybody reading the post thread in future will benefit from it.

2 Likes

Hello,

I believe you do not need to use SELECT in your expression; you are selecting the key column and your condition also matches the key column. Instead, I believe your expression should be:

LIST([template])

instead of:

SELECT(project_plan_template[project_template_id],[project_template_id]=[_THISROW].[template])

Would you please try this and tell us the outcome? Thank you!

1 Like