cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

Get Items/Filter Query help

Hello,

 

I had a follow-up question/issue from a previous post of mine (https://powerusers.microsoft.com/t5/Building-Flows/Need-help-to-check-if-item-exists-in-SP-list/m-p/...). I am using "Get items" in my Flow to check if the user has entered a name in the "New Hire Name" field on the form I created (official column name: New_x0020_Hire_x0020_Name). The idea is to check the list for that name and if it finds 1+, if zero is less than the amount of results, it will notify the creator it already exists. This list is intentionally set to have users ONLY see what they have created for privacy/security reasons, so marking the column in SP to only allow unique values is not an option. Screenshot below for my filter query and expression I am using. The expression ONLY results to TRUE, even if there are no items in the list in question. What am I doing wrong? 

 

new-hire-test.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get Items/Filter Query help

Hi @Morghan ,

 

Are you using the same list in both the Trigger and the action?

 

If they are the same list, then the Condition will always return True, as the new item created in the list will be counted as an existing one in the action Get items.

 

Please consider using two different lists in the trigger and the action.

 

In the following scenario, I am using two lists, List11 and List33.

 

If the new hire name already exists in List33, send an email to notify the creator. If not, create the new hire name in List33 then send an email to IT.

 

Besides, when using Filter query, we need to know its exact column name, you could get its column name by running the action “Get items” without any filter then get it from the run details.

1.PNG

 

Further, you don’t need to add “@” in front of the expression.

2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Get Items/Filter Query help

Hi @Morghan ,

 

Try putting a '@' sign before your expression.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Helper IV
Helper IV

Re: Get Items/Filter Query help

Hi @abm 

 

I am receiving an error that the expression is invalid: 

flow-1.jpg

Highlighted
Community Support
Community Support

Re: Get Items/Filter Query help

Hi @Morghan ,

 

Are you using the same list in both the Trigger and the action?

 

If they are the same list, then the Condition will always return True, as the new item created in the list will be counted as an existing one in the action Get items.

 

Please consider using two different lists in the trigger and the action.

 

In the following scenario, I am using two lists, List11 and List33.

 

If the new hire name already exists in List33, send an email to notify the creator. If not, create the new hire name in List33 then send an email to IT.

 

Besides, when using Filter query, we need to know its exact column name, you could get its column name by running the action “Get items” without any filter then get it from the run details.

1.PNG

 

Further, you don’t need to add “@” in front of the expression.

2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Get Items/Filter Query help

Hi Mabel, 

 

Thank you for the explanation, that definitely makes sense. I've created a separate list, called New Hire Request Lookup, and used that for Get items. If New Hire Name is not found in the Lookup list, sends email to IT then adds the new hire name to the lookup list. Works like a charm! Thanks again! 

 

m

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (5,883)