This post is based on a recent question that I got from a blog reader in a blog post related to List Formatting and setting field values:
I am trying to add an action button to my Microsoft list. The reason for this is that I would like the trip date column to populate with the current date the button was pressed. Just to make it easier for the executives to confirm they have completed a work trip. Can this be done thru list and conditional formatting and json coding?
We can use the customRowAction attribute with the setValue action type in list formatting to achieve this.
Basically we need to set a field value to the by retrieving the current date using the token @now (that detects the current date/time automatically).
This value brings the time automatically, so if we need to set the date only manually we can generate a string in the format ‘yyyy-MM-dd’ and it will also work, as below:
"customRowAction": {
"action": "setValue",
...
Source link
More About This Author
-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
- Modern Workplace11 May 2024How to get the current Azure Devops iteration name for a project using Power Automate
- Modern Workplace8 May 2024How to create Microsoft Teams private channels using Power Automate and the ‘Send a Microsoft Graph HTTP request’ action
- Modern Workplace1 May 2024Using the new ‘Send a Microsoft Graph HTTP request’ action in Power Automate to send urgent messages in Microsoft Teams
- Modern Workplace13 April 2024Power Pages and Cloud Flows – Validate user against Dataverse records based on Contact ID