cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

edit the item one time each user

I have a simple gallery that updates a SharePoint list,

 

My question is:

 

Is there a way for a user to edit one item at a time forever?

 

Like:   

 

If the user clicks on the item, a form appears, and when he saves, he can only edit that item once forever until it is removed or changed

 

1 ACCEPTED SOLUTION

Accepted Solutions
zmorek
Super User
Super User

You could consider storing the update data in the same list, then just concatenating the submitter's information each time! Then when you retrieve the item in your form, split it into a table, filter table by submitter, etc. Unsure if that's making it really gross/complicated though (especially if there's a chance a bunch of users can edit the same item)

View solution in original post

9 REPLIES 9
lcimon
Resolver I
Resolver I

Hello @Gorilla_8 

 

If I well understand, once user edit an item, you want to prevent another edition from him until someone else edit it.

Based on this assumption, and as you are using SharePoint, you can use the Modified column to know who is the last editor of you record. Then compare it to the current user to finally change the state of your form accordingly.

Gorilla_8
Impactful Individual
Impactful Individual

First of all thanks for the help! @lcimon 

 

 

You almost got it right...

 

What I need is when, a user can only edit an item once, once the user has edited it, he can't edit it anymore, but if another different user logs into the app, he can edit the item only once too

zmorek
Super User
Super User

I suppose a quick-and-dirty workaround would be to store the updates to the file in a separate list somewhere - store a file ID, and last-modified user.

Then on form submit, count the rows of that supplemental list filtered by the submitting user and file ID; if the row count is > 0, then the user edited that file, and you can stop them from submitting.

Gorilla_8
Impactful Individual
Impactful Individual

@zmorek 

 

Thanks for the idea!

I didn't think about this one, but I really wanted to solve this maybe with a variable in the item, or something like that.

zmorek
Super User
Super User

You could consider storing the update data in the same list, then just concatenating the submitter's information each time! Then when you retrieve the item in your form, split it into a table, filter table by submitter, etc. Unsure if that's making it really gross/complicated though (especially if there's a chance a bunch of users can edit the same item)

View solution in original post

Gorilla_8
Impactful Individual
Impactful Individual

@zmorek 

 

I will think about it, thanks for the help!

I will come later to give a answer

Gorilla_8
Impactful Individual
Impactful Individual

@zmorek and @lcimon 

I used the @zmorek  idea, because I simply did a list comparison, where if the user has already registered, I created a field if he has already reserved, and it simply blocks, comparing this field with others, such as the user's email and the booking date converted to UTC.

thanks guys for the help

@Gorilla_8 ,

You forgot to accept @zmorek 's solution (I have now done this for you) - please get in the habit of doing this (you have been posting here a long time) as we are all giving our time to try to help you.

Gorilla_8
Impactful Individual
Impactful Individual

@WarrenBelz 

Sorry about that @zmorek , I didn't mean it, and @WarrenBelz I didn't forgot your answer on my another about patch! I am just trying to study and I will give a response or accept as solution

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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