Forum Discussion
Update document item property from custom button in list view
Hello,
Thank you for your question! Adding a custom button to a SharePoint Online document library view to update a property based on custom logic is definitely achievable, and you have a few options depending on the complexity of the logic and your familiarity with different tools.
1. Using Power Apps: If you're looking for a no-code/low-code approach, Power Apps could be a great fit. You can create a custom form or interface that interacts with the document library and updates the lookup field based on your custom logic. Power Apps provides flexibility and can integrate easily with SharePoint Lists and Document Libraries. It's a more straightforward option if you're already comfortable with the platform.
2. Using Power Automate: Power Automate can be used to create flows triggered by button clicks. While this doesn't directly add a button to the document library view, you could configure it to update a document's property based on specific conditions.
3. JavaScript (via SPFx): For more advanced customization, the SharePoint Framework (SPFx) allows you to build and deploy custom extensions, including buttons in the list view toolbar. You can then use JavaScript to handle the click event and apply your custom logic to update the lookup field. This approach gives you the most control over the user interface and the underlying logic but requires more development effort.
I hope this gives you some direction! Feel free to ask if you need further details or examples.