cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesSnaps
Advocate V
Advocate V

Update variable column

Hi all, I have a sharepoint list with five columns, one for each day of the week, that are tracking tweet counts each day and incrementing a number.

 

I'm trying to find a way to update a list item's column depending on the day of the week, i.e. if today is Monday, update the number in the Monday column. However the update item action obviously just lists the columns, so there's no way for me to dynamically update a different column based on the day of the week it is.

 

Does anyone have any ideas as to how to achieve this, if it's possible?

1 ACCEPTED SOLUTION

Accepted Solutions

Another option would be to use a switch 

 

switch on 

dayOfWeek(utcNow())

Cases are 1, 2, 3 for each day of the week and perform the actions you neeed to in each one

 

Jambo 

View solution in original post

4 REPLIES 4
v-yuazh-msft
Community Support
Community Support

Hi @JamesSnaps,

 

You could add five parallel branch for each day in the week as screenshot below:

Capture.PNG

 

The expression in Condition as below:

@equals(dayOfWeek(utcNow()), 1)

The expression in Condition 2 as below:

@equals(dayOfWeek(utcNow()), 2)

And you could add branch with Condition 3,Condition 4,Condition 5 with expression as below:

@equals(dayOfWeek(utcNow()), 3)
@equals(dayOfWeek(utcNow()), 4)
@equals(dayOfWeek(utcNow()), 5)

 

Best regards,

Alice

 

 

 

Hi @JamesSnaps,

 

You could use the HTTP request to update the right column.

 

A rough plan for the flow could be:

Step 1 - Identify the day , the dayOfWeek() fucntion should help you here.

Step 2 -  create an send a HTTP request to SharePoint to get the value of the day of the week that you are interested in.

Step 3 - Increment the result

Step 4 -  create an send a HTTP request to SharePoint to set the value of the day of the week that you are interested in.

Another option would be to use a switch 

 

switch on 

dayOfWeek(utcNow())

Cases are 1, 2, 3 for each day of the week and perform the actions you neeed to in each one

 

Jambo 

View solution in original post

Thanks Jambo, have managed to implement your solution, thanks.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,393)