I have a form where we submit a daily summary of work carried out on the "Previous Day" and planned work for "Today". This data is them submitted to a sharepoint list. Currently, when populating the "Previous Day" field, we have to remember what we done, but is there a way so that the details submitted in the 7th July "Allan (Today)" field can be displayed in the 8th July "Allan (Previous Day) field.
So when I go to complete a new form, say for the 8th July, I would select the 8th July from the date picker on the form, it will look at the "Allan (Today) cell for the 7th July row in the sharepoint list and automatically display the details found in that cell in the "Allan (Previous Day)" datacard on the form. (I hope that makes sense). Is this even possible?
Thanks in advance,
Thanks @v-yutliu-msft @mdevaney for the joint effort and works great. 👍
Hi @StuartSmith ,
I agree with @mdevaney's most of view.
But I think you need to make a little change.
Do you want the "Allan (Previous Day)" field display last day's "Allan (Today) after you select date for the new record?
If so, then you need to use the action of selecting date for the new record as the trigger of displaying "Allan (Previous Day)" field.
What's more, you should use DateAdd function to calculate for date, it's not supported to use "-1" directly for date.
Try to set like this:
1)set the datepicker's OnSelect:
Set(var,true)
2)set Allan (Previous Day) datacard's Default:
If(var,
LookUp(your_datasource_name, Date = DateAdd(DatePicker_Date.SelectedDate,- 1,Days), 'Allan (Previous Day)')
)
Best regards,
@StuartSmith
You could do this by changing the Default property of Data card for the Allan (Previous Day) field.
LookUp(your_datasource_name, Date = DatePicker_Date.SelectedDate - 1, 'Allan (Previous Day)')
My assumption is the previous date only appears once in the Date column of your datasource (which makes it unique).
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional