Forum Discussion
Problems with static values in sharepoint list - possible workaround with JSON??
- Aug 05, 2024
Hi MatildaB1280,
I was wondering if you could change the approach a little bit.
If the calculated columns cannot be used for the calculation of the current week, maybe you can create a new calculated column to get the first day of the week for all items (this one doesn't need to be recalculated).
Then, you can use this value in views like ThisWeek and NextWeek.
ThisWeek view:
NextWeek view:
Would this be a solution for you? I have just tested it on a few items, but I hope it will work on a larger set of data. Another thing to note is the start of the week; in my case, it calculates the week starting from Sunday.
Hi MatildaB1280,
I was wondering if you could change the approach a little bit.
If the calculated columns cannot be used for the calculation of the current week, maybe you can create a new calculated column to get the first day of the week for all items (this one doesn't need to be recalculated).
Then, you can use this value in views like ThisWeek and NextWeek.
ThisWeek view:
NextWeek view:
Would this be a solution for you? I have just tested it on a few items, but I hope it will work on a larger set of data. Another thing to note is the start of the week; in my case, it calculates the week starting from Sunday.
- MatildaB1280Aug 12, 2024Copper Contributor
Hello @michalkornet
Thanks for your responses. I belive this worked for me as I implemented it last week, checked the view this week and the change from last week is gone as I wanted. I thereford wanted to ask you the same for the year. I filter using the year in a similar way and worried about whether it wont update, even though its only every 365 days this would pose problem. Im worried if this method will also not refresh automatically, can you tell me please?
- michalkornetAug 12, 2024Iron Contributor
Hi MatildaB1280, in this case, we can use a similar approach as in the 'week' example. The 'Change-Year' column is fine and can be used in the view filters. The easiest way would be to simply enter '2024' in the filter input for this year, like this.
I also saw some examples where we can create two calculated columns: one for the start of the year from a date (to get January 1st, 2024) and another for the end of the year (to get December 31st 2024). Then, we can filter items in the view where Today is greater than the start date and less than the end date.