cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vuzeo
Frequent Visitor

ODATA filter to check if a value is equal in a column

Hello!

 

I am trying to build an ODATA filter that checks if a value is present in a newly inserted list column entry after a PowerApp form submission that notifies my supervisor of an approval via MS Approvals.

 

I have 2 columns on my SharePoint List:

- TR-ID

- TRIDD_2


TR-ID has an auto generated entry and is connected to TRIDD_2 so that the ID numbers can be passed around and followed via an auto-increment formula I've implemented ("AA10-TRIDD_2-2022", an example would be "AA10-1234-2022") while TRIDD_2 is in charge of auto incrementing the ID itself (1234)

 

In my Power Automate "Get items" I want to get items only related to the newest entry based on the ID that I have received from the latest entry, example if I were to enter an new entry in the form my Flow would automatically know that the latest entry on the SharePoint List is that latest entry. My goal is to mitigate any possibility of wrongfully given user entries (if me and my coworker enter items into the Form, our managers should get our entries on the list via Approvals and not the other way around.)

 

What I'm trying to do is when the "Get items" is triggered to filter the TR-ID (AA10-1234-2022) with the TRIDD_2 (1234) and to get that exact file to be sent to the Approvals app for proper management of tasks and data entries.

 

And I'm stumped. I hit a brick wall and I'm down to using "ID desc" in my Order by however that has issues with getting wrongful information.

10 REPLIES 10
Hardesh15
Super User
Super User

@Vuzeo What kind of trigger you are using here. If you are using trigger- When an item is created this will automatically take your latest details from SharePoint List. 

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Vuzeo
Frequent Visitor

@Hardesh15 I am using "When a file is created" since the automation process relies on a ZIP extraction and file creation on SharePoint.

@Vuzeo Pls share your flow screens.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Vuzeo
Frequent Visitor

@Hardesh15 

Main screen:
ahasanefendi_0-1655293585562.png

Elaboration:

ahasanefendi_1-1655293788970.png

The filter portion:

ahasanefendi_2-1655293933912.png

 

 

@Vuzeo Thanks for Sharing flow screens. Now tell me where you are facing issue?

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Vuzeo
Frequent Visitor

@Hardesh15,

I am facing the issue where if more simultaneous users send an entry through the form that my filter with get the wrong entries in the list and apply them in the Approval portion of the flow, mainly trying to prevent the possibility of wrongly gotten list entries. That's why I'm thinking that an ODATA filter could help me resolve this issue.

@Vuzeo i am not getting any context how OData will help you here?. if possible use filter array which can help you here.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Vuzeo
Frequent Visitor

Filter array? Can you please provide an explanation

@Vuzeo  as per your flow Filter will also not work. And i am thinking why you are using this trigger? Why not using when item is created in list?

Any specific reason.

Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

@Hardesh /Gopenly.in

Vuzeo
Frequent Visitor

The form users fill out is for submitting documents digitally or without any documents in case they deliver it to the office. The trigger is responsible for extracting documents as outlined in my screenshot (2nd and 3rd step).

If I take out the trigger, those two will not work:

ahasanefendi_0-1655297547258.png

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,400)