Forum Discussion
johnjohn-Peter
Feb 12, 2025Iron Contributor
Set Unique value based on the (CreatedDate & CreatedBy)
We want to create a SharePoint online custom list with these business logic:- Users enter an entry each day to specify their location (which site they are working in).. No one can see other entrie...
Rob_Elliott
Feb 13, 2025Bronze Contributor
I wouldn't let users anywhere near the list at all (although they would have to have contribute permissions on it). I would build an app in Power Apps with the SharePoint list as the datasource. Also add the Office365Users connector. When the app starts get the items submitted by the current logged in user and display those in a gallery. Then have a form on the same screen where new items can be submitted but, by setting the DisplayMode of the "Submit" button it won't allow the button to be clicked if that date already exists in the gallery. The app can be used on a smartphone, tablet or laptop. Let me know if you would like an example of this to be posted up.
Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)
johnjohn-Peter
Feb 13, 2025Iron Contributor
but we need to keep in mind that Power apps will still allow the users to modify the list through API or using the SharePoint list view.. i were implementing those requirements using pre-edit and pre-add remote event receivers, but unfortunelty we no longer have those options, to run server-side code on pre-edit and pre-add
- Rob_ElliottFeb 14, 2025Bronze Contributor
No, Power Apps doesn't allow that., certainly not for end users who are not co-owners. If users don't know the site the list is on then it will be highly unlikely that they will find it. So they won't see the list view and they won't know what to put in an HTTP request in a flow or some other api. With 70,000 staff I have never yet had a case where a list we have buried somewhere has been found and changed. It's a list to report the site a user is on, not the codes for nuclear missile launches, so I don't see why staff would want to waste time looking for the list then trying to change entries on it? Don't you trust your staff just to fill it in?
My bowls match was cancelled today so I spent an hour building a fully-working example of the app. Although you'll see that there are other users who have completed entries, only my entries are shown in the app and if the gallery already has a date for me then it won't allow me to save a existing or new item with that date. And there is no way that a user can guess what the site or list has been used as the datasource.Rob
Los Gallardos
Microsoft Power Automate Community Super User.
Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)