This is actually mad. I've managed to change the date format on the Power App Table to UK however still Power Apps views these date fields in US format!
Right now I have the whole thing working with US dates. The idea is you choose a date from the drop down then you click the button to increase that quantity by 1. The table has duplicate barcodes with specific expiry dates. The purpose of the pie graph reading the table is instant feedback what the quantity has changed to
This is the drop down formula. Which does not try to change the 'Expiry Date' field using Text or anything because then the button stops working. The intellisense is showing the dates are in format value: 9/15/2022, 12:00:00 AM
Sort(Distinct(Filter(Filter('Quantity-Expiry Counts',Barcode=DataCardValue1.Text),Quantity>0),'Expiry Date'),Value,SortOrder.Ascending)How can I change the drop down to UK format and change the patch formula so it keeps working?
I've tried a lot of data types and even if(a=b on the drop down selected value and a text field if solving the format allows the patch formula to work, it doesn't or daisy chaining things together.
If anyone's wondering how I got the pie chart to show 2 fields, that is actually 2 pie charts on top of each other.
Here is the Patch formula behind the green add one quantity button.
Patch(
'Quantity-Expiry Counts',
LookUp(
'Quantity-Expiry Counts',
Barcode = DataCardValue1.Text && 'Expiry Date' = DateValue('Dropdown Raw'.SelectedText.Value, "en-US")
),
{
Quantity: LookUp(
'Quantity-Expiry Counts',
Barcode = DataCardValue1.Text && 'Expiry Date' = DateValue('Dropdown Raw'.SelectedText.Value, "en-US")
).Quantity + 1
}
)
Edit:
I have finally spotted exactly what is going wrong according to the intelisense:
DateValue('Dropdown Raw'.SelectedText.Value, "en-US")
When the dropdown is in UK format mode, this formula is not moving the day-month values back to their positions. so 09/03/2023 (dd/mm/yyyy) stays 09/03/2023 as (mm/dd/yyyy) which is a valid date in both formats and 15/03/2023 (dd/mm/yyyy) gets converted into 15/03/2023 (mm/dd/yyyy) which errors and shows a random valid date from the table in the intellisense instead.

Report
All responses (
Answers (