cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gareth2513
New Member

Adding new item if it does not exist

So I am building a place to upload training certficates, I am using microsoft forms to let users uplolad their certs and they are saved into a list on sharepoint using a flow. However, I am having issues with getting the flow to determine if a user has already uploaded a cert, if they have then I want to update their item with with the new cert and a new date of renewal is set. 

 

The value I am check to see if someone has already uploaded a cert is the EmployeeID, if that ID exists the list should update, if not then the a new item should be created. To do this I get items and filter by Staff number and then do a conditional check to see if the length is 0, if it is then create new item but the issue I face is that when the staff number is not present the list is empty so the conditional check ends up being greyed out and not running. 

 

Here is my get items, outputs contains the staff number pulled from the user's profile who is uploading a cert. 

get items.PNG

 

My conditonal check

conditional check.png

 

As I said this results in the condition just being greyed out if the user has not uploaded a cert before. The flow all works if I remove any conditions but then users will end up with multiple separtate entries. The update user part also works if they exist. 

 

Output:output.png

 

 

What would be the best way to check if the staff number is already in the list? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Srini84
Frequent Visitor

3 REPLIES 3
Srini84
Frequent Visitor

@gareth2513 

 

Check below link for your reference

 

https://tomriha.com/how-to-check-if-sharepoint-item-already-exists-in-power-automate/

 

Hope this will help you

 

Thanks,

Srini

Thanks @Srini84 That is acutally what I have been trying but using staff number rather than email but like I said when I do this I just get the greyed out condition. 

gareth2513
New Member

I actually ended up starting this from scratch, not sure what was throwing it off in the first flow but now it is working using the method above.

 

Full Flow for those interested:

full flow.png

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (2,360)