Hi all,
I have Power App with a form that has two dates, a start date and an end date. These dates are being added to a collection when the value is changed. This works fine.
However if the user then changes the value of one of the fields, I need a way to be able to remove the previously selected dates from the collection and then add the new values.
I was trying to capture the old values in a variable using On Select so that I can do a comparison in On Change, but the On Select does not seem to trigger for the date picker.
Does anyone know of a way I can achieve this functionality?
E.g. if I have a date picker and I select 29/12/2021, that is added to my collection. Then I change my mind and want the date picker changed to 30/12/2021, I need 29/12/2021 removed from the collection before I add 30/12/2021
Solved! Go to Solution.
Hi @rdorman,
Do you want to update the date field once the DatePicker changes?
Could you please tell me more about your scenario?
I think you could just reference to the OnChange property of a DatePicker. Once the date changes to a new one, the OnChange property trigger an update action.
However, removing the previous date should be finished firstly and then a new date should be updated in seconds after you submit the form
Set the OnChange property of the DatePicker as below:
UpdateIf(CollectionName,ID=ThisItem.ID,{Date:Blank()})
Hi @rdorman,
Do you want to update the date field once the DatePicker changes?
Could you please tell me more about your scenario?
I think you could just reference to the OnChange property of a DatePicker. Once the date changes to a new one, the OnChange property trigger an update action.
However, removing the previous date should be finished firstly and then a new date should be updated in seconds after you submit the form
Set the OnChange property of the DatePicker as below:
UpdateIf(CollectionName,ID=ThisItem.ID,{Date:Blank()})
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
191 | |
57 | |
43 | |
36 | |
34 |
User | Count |
---|---|
270 | |
78 | |
75 | |
74 | |
66 |