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

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
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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (10,978)