cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ctedesco3307
Helper III
Helper III

Filter on Get Items

I have a master project table and a project details table

The master project table has the summary project information

ctedesco3307_0-1665249239524.png

 

The a project details table holds the project roles and values. There are 4 roles  ctedesco3307_1-1665249239541.png

 

I’m trying to set up a flow to have the Project Mgr from the project details table update the master project table when it’s assigned.

 

I have a filter on the Get Items to only get the items that are Role = “Project Mgr” but the filter is not working. The flow updates the Project Manager field in the master project table even if the row added in the project details table is a different role. field_8 is 'Role'  - Role is a choice field. If I select the field from Dynamic Content I get an error.  I found another post that suggested typing in the actual column name so I tried that instead. No error, but does not seem to work. 

ctedesco3307_0-1665253900422.png

 

 

 

I tried adding a condition to verify the Role =  ‘Project Mgr’ – but this results in reverse, showing as false even if I do enter Project Mgr in the project details table

ctedesco3307_3-1665249239547.png

 

 

What am I doing wrong? Thx

 

 

4 REPLIES 4
Sundeep_Malik
Community Champion
Community Champion

Hey @ctedesco3307 

Not sure I got your question well.

But in the filter query write this:

 

ID eq 'Master Project ID' and Role eq 'Project Mgr'

 

Master Project ID above is dynamic expression, just write those braces before and after the dynamic expression

ctedesco3307
Helper III
Helper III

Hi @Sundeep_Malik   MasterProjectID is a Dynamic content field.  field_8 in the Get Items screen shot is the same field as the Role Dynamic content in the condition screen shot.  field_8 / Role is a choice column in the list If I use Role Dynamic Content in the Filter, I get an error, so I entered the actual field name instead. 

OliverR-82
Continued Contributor
Continued Contributor

The part of your query:

field_8 eq 'Project Mgr'

seems to be okay to me, if the internal fieldname is indeed field_8. The fact that you don't get an error seems to confirm that the field is indeed called field_8.

 

What is the 'IDs' field you are referring to in the query? What type of field is that?

 

Also, in the condition where you are checking if the role is really 'Project Mgr', you should choose the dynamic content Role value, not Role. But that will obviously not solve the problem with the Get Items query...

Grant_Jenkins
Helper I
Helper I

I'm not sure why you are using a Get items action. You only need the trigger When an item is created or modified and a single action Update item (unless I'm missing something).

 

As an example, I've created a couple of lists as below:

 

Master list where the Project Manager field is of type single line of text.

Grant_Jenkins_0-1665298924429.png

 

Details list where the Master Project is a Lookup column to the PS Contracts master list (Title), Role is a choice field, and for simplicity, the LTNAME field is a single line of text.

Grant_Jenkins_1-1665298984798.png

 

IMPORTANT: The trigger has a trigger condition on it (via the action's Settings) that means the flow will only run if the Role it equal to Project Manager (in my example).

 

Grant_Jenkins_3-1665299208830.png

 

The Update item action will update the master list using the Master Project Id from the details list.

 

See the full flow below:

Grant_Jenkins_6-1665299745338.png

 

To add the trigger condition, go into Settings from the trigger as shown below:

Grant_Jenkins_0-1665300185504.png

 

As an improvement you could also get the previous version of the details list to only update the master list if the Project Manager has actually changed from last time (you might update the details list without actually changing the Project Manager, but this would still update the master list regardless at the moment).

 

Grant_Jenkins_5-1665299697455.png

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,607)