Hi,
I am building a desk booking app, and want to write back to the Dataverse table when someone has used the QR code to checkin to their desk. This is using First+Filter so that only the user who has booked the desk originally can update the Dataverse.
On the Confirm button's OnSelect property, I keep getting an error message of "Incompatible types for comparison. These types can't be compared: Date, Text"... The column type of 'LDN_Desk_Reservation_Date' is Date Only.
Here is the formula - the lblBookingDate just has a value of "Today()" but it won't work due to the above error message...
Patch(
LDN_Desk_Reservations,
First(Filter(LDN_Desk_Reservations, 'Desk Reference'= QRValue.Text && 'LDN Desk Reserved For' = User().FullName && 'LDN Desk Reservation Date' = lblBookingDate))),
{'Check In Status': "Checked In"}
);
Any ideas?
Thanks
K.
Solved! Go to Solution.
Assuming lblBookingDate is a label, you would have to use DateValue(lblBookingDate.Text) to get the date value from it.
Assuming lblBookingDate is a label, you would have to use DateValue(lblBookingDate.Text) to get the date value from it.
Why not use Today() in your formula instead of lblBookingDate or use a datepicker control instead of a textbox?
Hi @Kosenurm
To convert the date value in the text you can use Text(),
lblBookingDate is in text format and 'LDN_Desk_Reservation_Date' in date format so you can use
Text('LDN_Desk_Reservation_Date') for comparison.
Hope this will work.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |