– I’ve always found working with Dataverse date columns in Power Apps temperamental. I’ve always found a solution that works, but the nagging doubt has remained that I wasn’t completely clear why there was a problem and hence how I’d solved it
This week it happened again when I was comparing the date in a DatePicker control to values in a Dataverse ‘Date only’ column and displaying the filtered results in a gallery. ‘Date only’ columns are where the date stored doesn’t include a time. Depending on how I structured the formula, sometimes the expected data was displayed and sometimes not! Equally, sometimes an error is visible on screen and sometimes not
When I get unexpected results from a Power FX formula, particularly when I’ve been working on an app for a while, my first instinct is to save and reload the app to get a fresh version, because this clears the memory cache and sometimes this addresses the problem. This time that didn’t work and I was determined to get to the root of the problem and find out what I was doing wrong. It took quite a bit of trial and error but I got to the bottom of it!
Composing Filter Expressions
I’ve aways thought of the Filter function as being very forgiving, and it doesn’t matter which way around the data is entered. For example, when using a gallery to display a Dataverse table, adding either of the following formulas to the Items property of the gallery produces the same result: