Hi All,
I have several SharePoint Lists added to my PowerApp. On one screen I have a Gallery where I want to be able to dynamically display the data of various different events lists.
All of the SharePoint Lists are identical in column Layout.
What is wrong with the code that I have included below that it throws up an error as having invalid arguments?
Sort(
Filter(
(Switch(
ComboBox1.Selected.City,
"Cannington",'WA Metro Events',
"Artarmon",'NSW Metro Events',
"Heatherton",'VIC Metro Events',
"West End",'QLD Metro Events',
"Newcastle",'NSW North Metro Events',
"Clarence Gardens", 'SA Metro Events',
"Hobart", 'TAS Events',
"Fyshwick", 'ACT Events',
"Berrimah", 'NT Events'
)),
'Start Time' >= Today()
),
'Start Time',
Ascending
)
Solved! Go to Solution.
Hi @GTSam ,
I must admit I have never tried to do what you are doing - have you considered simply having one list and a field for city ? There are times where you simply need to plan your data to suit the app, not the other way around.
Hi @GTSam ,
Apart from a couple of unnecessary brackets, the structure is correct, however for this to have any chance of being valid, all the lists would need to be identical in field names and field types - is this the case ?
Sort(
Filter(
Switch(
ComboBox1.Selected.City,
"Cannington",
'WA Metro Events',
"Artarmon",
'NSW Metro Events',
"Heatherton",
'VIC Metro Events',
"West End",
'QLD Metro Events',
"Newcastle",
'NSW North Metro Events',
"Clarence Gardens",
'SA Metro Events',
"Hobart",
'TAS Events',
"Fyshwick",
'ACT Events',
"Berrimah",
'NT Events'
),
'Start Time' >= Today()
),
'Start Time',
Ascending
)
BTW - good to see at least 1 Qld event in there . . .
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Yes all of the lists are exact copies of each other except for the data of course. Same field names and types.
Despite that this should work, it still throws up the invalid arguments error.
Hi @GTSam ,
I must admit I have never tried to do what you are doing - have you considered simply having one list and a field for city ? There are times where you simply need to plan your data to suit the app, not the other way around.