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

How to Restrict Users from Creating List Items a Second Time

Hello everyone!!

 

I have created a SharePoint List and have granted 365 dynamic groups access to it.

 

My current dilemma is that I need each user to only be able to submit one list item to the SP list.  I wanted to know if there is possibly a flow that could be created that would delete any new list items if a user has already contributed once to the SP List.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ccc333ab
Solution Sage
Solution Sage

Not sure if this was what you were asking, but this is what I think you are asking. 

 

1. Trigger your flow when a new item is created. 

2. Get all the items in your list filtered by the user that just created the item, but is NOT the same one that was just created (i.e., has the same id). 

 

ccc333ab_6-1625719510139.png

 

 

3. If any records are returned then you'll want to delete the items just created. However, if no records are returned, this is the first time this user has added an item and it'll do nothing. (Note, in my yes condition, I just have a compose statement...you would include your delete statement here). 

ccc333ab_4-1625719259910.png

The expression in the condition is: 

 

 

length(body('Get_items')?['value'])

 

 

 

 

View solution in original post

4 REPLIES 4
ccc333ab
Solution Sage
Solution Sage

Not sure if this was what you were asking, but this is what I think you are asking. 

 

1. Trigger your flow when a new item is created. 

2. Get all the items in your list filtered by the user that just created the item, but is NOT the same one that was just created (i.e., has the same id). 

 

ccc333ab_6-1625719510139.png

 

 

3. If any records are returned then you'll want to delete the items just created. However, if no records are returned, this is the first time this user has added an item and it'll do nothing. (Note, in my yes condition, I just have a compose statement...you would include your delete statement here). 

ccc333ab_4-1625719259910.png

The expression in the condition is: 

 

 

length(body('Get_items')?['value'])

 

 

 

 

View solution in original post

lparkerMDVIP
Helper III
Helper III

@ccc333ab Thank you for responding! I don't quite understand how the last screenshot deletes the item. Wouldn't I need the Delete Item SharePoint action? When I used your expression, the condition returned False.

lparkerMDVIP
Helper III
Helper III

@ccc333ab Step 2 did return 1 item. So that part was successful.

lparkerMDVIP
Helper III
Helper III

@ccc333ab I was able to fix it!! I was using Created By Display Name instead of Created By Email in the Filter Query! What I did differently was, in the Yes section, added a delete item action for the recently created item. Thank you!!!!!!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,721)