cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Morghan
Level: Powered On

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
Community Support Team
Community Support Team

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
Super User

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!



Morghan
Level: Powered On

Re: Get Items/Filter Query help

Hi @abm 

 

I am receiving an error that the expression is invalid: 

flow-1.jpg

Community Support Team
Community Support Team

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

Morghan
Level: Powered On

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

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

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!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (4,967)