Using Power Automate show the most recent comment from SharePoint text fields instead of “View Items”

Problem

The customer asked how to do the steps described in the following article in Power Automate? The article uses SharePoint Designer and SharePoint Workflow.

SHOW THE MOST RECENT COMMENT FROM SHAREPOINT TEXT FIELDS INSTEAD OF “VIEW ITEMS”

The scenario is the above list contains two columns ‘Comments’ and ‘MostRecentComments’. The ‘Comments’ column has multiple text but shows it as ‘View Entries’. The SharePoint view shows that because the list is created as ‘version’ enabled list. Every text entered in the ‘Comments’ column it is stored as a version including null.

The common technique is to last comments entered in the list is to add another column called ‘MostRecentComments’. Using the flow as an item added or modified copy the *last* comment entered to the MostRecentComments field.

Step By Step Solution

Step #1 Create a new Power Automate Flow with the Trigger as ‘When an item is created or modified’. Add your Site Address and List Name to the Trigger.

Step #2 Next you will add a trigger condition by clicking on ‘…’ and ‘Settings’. In the Trigger Conditions you will add the following line. Please make a note don’t forget ‘@’ before the expression.

@not(equals(triggerOutputs()?['body/Comments'],null))

Step # 3 Now update the ‘MostRecentComents’ with the last comment added by the user.

Results

As you can see the results the flow runs when the new item is created or modified, the flow updates the ‘MostRecentComments’ field with the last comment. The flow will also skip if user do not add anything in the comments as the trigger condition checks for the null value in the comments.

Please write your comments if this helps you.

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in Power Automate. Bookmark the permalink.

4 Responses to Using Power Automate show the most recent comment from SharePoint text fields instead of “View Items”

  1. Pingback: Part Two – Using Power Automate show the most recent comment from SharePoint text fields instead of “View Items” | Pankaj Surti's Blog

  2. jensih says:

    Hello Pankaj, I tried to set this up. I get a warning from flow checker saying that actions in this flow may result in an infinite trigger loop :O. I should add appropriate conditional checks to prevent the flow from triggering itself. Any idea what I can have done wrong? Hopeful to get it to work 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s