cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SlobodanP
Level: Powered On

Sharepoint list - automatically update next field when the one before is modified

Hello,

 

I'm trying to build a flow where whenever an item in the list is updated, it will autopopulate a field in the next column.

 

Let's say I have columns:
1st check (yes/no column),
1st check details (single line text) 
2nd check (yes/no column)
2nd check details (single line text)
3rd check (yes/no column)
3rd check details (single line text)

 

Whenever user clicks on edit item and then "yes" in the "1st check column" it will automatically populate field next to it ("1st check details column) with current date/time and display name of the user. If a user marks "Yes" in the "3rd check column", field next to it (in "3rd check details" column) will automatically have current date/time with a display name of the user.

 

In other words, what I'm trying to do is use Yes/No as a trigger and make Sharepoint automatically populate field next to it (in the same row, of course, not all fields in the list) whenever Yes is selected. 

 

I have tried to do it setting up nested IF but it will usually fail.

 

Does someone have idea how to do this without nested if?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sharepoint list - automatically update next field when the one before is modified

Hi @SlobodanP,

 

Would the 2nd check column be selected with Yes if the 1st check details column is populated with text?

If the 2nd check column would not be selected with Yes when the 1st details column is populated with text, please take a try with the following workaround:

  • Add “When an item is created or modified” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
    @and(equals(triggerBody()?['OData__x0031_st_x0020_check'], true),empty(triggerBody()?['OData__x0031_st_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition, add “Update item” action, 1st check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition, add a Condition 2, click “Edit in advanced mode”, type the following formula:
@and(equals(triggerBody()?['OData__x0032_nd_x0020_check'], true),empty(triggerBody()?['OData__x0032_nd_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition 2, add “Update item” action, 2nd check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition 2, add a Condition 3, click “Edit in advanced mode”, type the following formula:
@and(equals(triggerBody()?['OData__x0033_rd_x0020_check'], true),empty(triggerBody()?['OData__x0033_rd_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition 3, add “Update item” action, 3rd check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition 3, we do nothing.

Image reference:22.JPG

 

23.JPG

 

24.JPG

 The flow works successfully as below:25.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Sharepoint list - automatically update next field when the one before is modified

Hi @SlobodanP,

 

Would the 2nd check column be selected with Yes if the 1st check details column is populated with text?

If the 2nd check column would not be selected with Yes when the 1st details column is populated with text, please take a try with the following workaround:

  • Add “When an item is created or modified” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
    @and(equals(triggerBody()?['OData__x0031_st_x0020_check'], true),empty(triggerBody()?['OData__x0031_st_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition, add “Update item” action, 1st check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition, add a Condition 2, click “Edit in advanced mode”, type the following formula:
@and(equals(triggerBody()?['OData__x0032_nd_x0020_check'], true),empty(triggerBody()?['OData__x0032_nd_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition 2, add “Update item” action, 2nd check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition 2, add a Condition 3, click “Edit in advanced mode”, type the following formula:
@and(equals(triggerBody()?['OData__x0033_rd_x0020_check'], true),empty(triggerBody()?['OData__x0033_rd_x0020_check_x0020_deta']))
  • Within “If/yes” branch of Condition 3, add “Update item” action, 3rd check details field set to current date/time and Display Name of user.
  • Within “If/no” branch of Condition 3, we do nothing.

Image reference:22.JPG

 

23.JPG

 

24.JPG

 The flow works successfully as below:25.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

SlobodanP
Level: Powered On

Re: Sharepoint list - automatically update next field when the one before is modified

Hi Kris,

 

This worked, I have missed the "empty" trigger.

 

Many thanks.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 444 members 5,913 guests
Please welcome our newest community members: