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?
Solved! Go to Solution.
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
Hi @JamesSnaps,
You could add five parallel branch for each day in the week as screenshot below:
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
Thanks Jambo, have managed to implement your solution, thanks.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
41 | |
31 | |
28 | |
28 | |
27 |