For some reason, no matter what I do, I can't get my OnSelect to patch any type of value (data, text, value) to a blank date field in a record of a local collection.
The local collection is called cpaDB and it is generated by importing an Excel table into PowerApps. The collection shows up perfectly in my gallery. When I try to update a date value in it, nothing happens.
I have tried patching the exact same DatePicker to a text field and that works so I then tried
To see if my CA-MD-Lic-Exp field was being read as text instead of a date, but then i get an error of:
"The type of this argument 'CA-MD-Lic-Exp' does not match the expected type 'DateTime'. Found type 'Text'."
Considering it would do NOTHING with the above Formula 1, and it throws an error with Formula 2, I went ahead and tried passing it as a value, which (as expected) didn't do anything to help.
I then tried to use DateTimeValue()
But this said it was expecting a text value for the DateTimeValue
So I wrapped the selected date in Text()
No error but it does nothing...
This seems like an incredibly simple thing (I just want to pass the date from the datepicker into the CA-MD-Lic-Exp field in my local collection) so I must be missing something incredibly obvious?
Note: Out of curiousity, I went to another record where the CA-MD-Lic-Exp field was not blank (it contained one of the dates exported into it from Excel) and I was able to patch it with the datepicker value successfully using Formula 1.
Can you look at how the table is setup in Excel--is the date column appearing as a date, value, or text?
Is this just a bug? If it's not verified, maybe someone else can see if they can reproduce the error?
Need to have an Excel spreadsheet in Onedrive (for business?) with a table containing a few different columns, one of which contains dates (in 90% of the records? Leave the other 10% blank) formatted as a date.
Use it as a data source in a PowerApps. Import that data source to a Collection. Then create a gallery and use a datepicker to reference that field. Use a button to patch the field.
For myself, I can patch changes to the field for records in the collection that already have a date but I can't patch changes to fields that are blank in the collection.
I have very similar issue.
Local Collection, created from MS SQL Database:
I am not able to patch cell which is NULL in this collection.
For example - Collection has 2 columns: USER_ID and USER_VALUE (integer)
below code works only for records where USER_VALUE is not null:
I have the same issue with date column.
I have the exact same issue with a SQL backend powerapp. Create a local collection on load and if the date is null then the collection will not take a patch.
We experience exactly identical behaviour. If date column already has datetime filled in, patch owrks. if column in given row is NULL, nothing happens.
Continue your learning in our online communities.
Stay Up-to-Date by following PowerApps on Twitter
Let's thank our top community contributors
Features releasing from October 2019 through March 2020
Coming to a city near you
Fill out a quick form to claim your user group badge now!
Connect, share, and learn with your peers year-round
Features releasing from April 2019 through September 2019!