Am trying to present a Gallery of data grouped by a field called meterno. I can get the Gallery to display and it is grouped by that field correctly but I need additional fields like eventID added so I am trying to use AddColumns
My code for the Items property of the Gallery is not showing any errors but when I try to display the eventID field, for example, it is telling me it is a Record (the Text property for the label in the Gallery is ThisItem.theeventid)
the Items property of the Gallery is:
AddColumns(
GroupBy(
With(
{
_preFilter: Filter(
Claims,
startdatetime >= (DatePickerFrom_2.SelectedDate) && (enddatetime <= DatePickerTo_2.SelectedDate)
)
},
If(
!IsBlank(Searchbox_1.Selected.eventID),
Filter(
_preFilter,
(eventID in Searchbox_1.SelectedItems.eventID)
),
_preFilter
)
),
"meterno",
"licensee",
"Title",
"Data"
),"theeventid",Data.eventID)
it's probably something simple but I can't seem to work it out
any help much appreciated as always 🙂
Hi @bobgodin ,
I have made a few other suggestions as well as fixing the eventID issue<
With(
{
_preFilter:
Filter(
Claims,
startdatetime >= DatePickerFrom_2.SelectedDate &&
enddatetime <= DatePickerTo_2.SelectedDate
)
},
AddColumns(
GroupBy(
Filter(
_preFilter,
Len(Searchbox_1.Selected.eventID) = 0 ||
eventID in Searchbox_1.SelectedItems.eventID
)
),
"meterno",
"licensee",
"Title",
"Data"
),
"theeventid",
First(Data).eventID
)
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.
MVP (Business Applications) Visit my blog Practical Power Apps
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.