In SharePoint Online (E3 subscription) I have 5 lists in a site and in each list the user is to enter 1 item. The end result is to enable the Create and Edit button conditionally on a page next to text of list name. The only field that could have a unique value in the lists would be Created By. I have the link for Create. I need the link for each list's Edit button as well as how to enable/disable the other links on the page.
- List 1 Create link enabled, all other links disabled
- User clicks List 1 Create link, enters data and saves
- List 1 Edit button enabled, all other links disabled
- List 1 Field 'Approved' default = False. When supervisor approves data through workflow or field on a page, 'Approved' is ticked becoming True.
- List 2 Create link enabled, all other links disabled
- Do for all lists
I have the link to the Edit for each list and the end of the link has 'ID=1'. I don't want to hard code 'ID=1' just in case the item has to be deleted for some reason since it auto number increments.
I have read about creating a workflow that puts a copy of the Created By into a field and check to make sure that field is unique. That works for making sure there is a unique entry. I also need the link for the Edit button as well as the conditional formatting enable/disable.
I could use SP.List.getItems and in the WHERE put in 'Approved'=True
How would I get the ID or would I use Created By = Me
Where would I use the JS and how would I conditionally format text or images on the page?
With all the conditional formatting, do I need to check for a unique record per user?
Is there a different way to think about this?