Hi @TheAudioPolice,
Could you please share a bit more about your scenario?
Do you want to save your column name within a global variable, then filter your Gallery items based on this variable?
Based on the needs that you mentioned, I have made a test on my side, if you want to save your column name within a global variable, then filter your Gallery items based on this variable, I afraid that there is no way to achieve your needs in PowerApps currently.
Currently, within PowerApps, when you want to filter a data source based on a column, you must provide a specific column name rather than a variable.
As an alternative solution, I have made a test on my side, please take a try with the following workaround:
Modify the formula within the OnVisible proeprty of your screen to following:
ClearCollect(LedenColl, Ledentst); Set(Filter1, "NoValue"); Set(Filter2, "NoValue")
Modify the formula within the OnSelect property within the same screen to following:
Set(DatumStart, Date(Year(Today()), 1, 1));
Set(DatumEind, Date(Year(Today()), Month(Today()) + 1, 0))
Add a "Filter" Icon button within your app, name it as "Opzegdatum" (Date column name that you mentioned), set the OnSelect proeprty to following:
ClearCollect(
LedenColl,
Filter(
Ledentst,
(Filter1 = "NoValue" || Type.Value = Filter1),
(Opzegdatum >= DatumStart && Opzegdatum >= DatumEind) /* <-- Opzegdatum column (Cancellation date) represents the Date column in your SP list */
)
)
Note: If you want to filter your Gallery items based on other Date columns, please take a try to add corresponding "Filter" Icon buttons as above, then try above solution I provided to filter the LedenColl Collection. E.G.
ClearCollect(
LedenColl,
Filter(
Ledentst,
(Filter1 = "NoValue" || Type.Value = Filter1),
(DateColumn2 >= DatumStart && DateColumn2 >= DatumEind) /* <-- DateColumn2 column represents the Date column in your SP list */
)
)
Set the Items property of the Gallery to following:
SortByColumns(
Filter(LedenColl, Lijstfilter_1.Text in Lidno || Lijstfilter_1.Text in Achternaam),
"Achternaam",
Ascending
)
Best regards,