Hi,
I have a gallery with report records on it but currently it is show up as multiple records. How do I show only distinct records?
Below is my formula: It looks at the input search text box for any data, if no data, show everything
If(IsBlank(SearchBox.Text),
SortByColumns('app.database',"cdr_date",SortOrder.Descending),
SortByColumns(Search('app.database',SearchBox.Text,"crew","cdr_ref","service_order","location"),"cdr_date",SortOrder.Descending)).
Secondly, I have another gallery which pulls in the report LxWxD data. How can i filter that gallery so when I select the distinct report in the first one, it will show all the rows of LxWxD data (for example if it has three rows of record for that)
Thanks!
Please do not forget to close this and give the solution.
Hi,
Yes there is the process I follow is to add lookups for the fields you want
Thanks all! Now I realized the distinct only bring in the one value - for example cdr_ref. Is there a way to bring in more such as crew, cdr_ref, service_order, location?
Hi @weebot ,
In fact, you do not need if and isBlank to judge the SearchBox, and the first gallery can also be sorted by your given criteria. You can make some adjustments to Search statement by setting Items in the first gallery:
Distinct(SortByColumns(
Search(
'app.database',
SearchBox.Text,
"crew",
"cdr_ref",
"service_order",
"location"
),
"cdr_date",
SortOrder.Descending
),LxWxD)
Then set the Items of the second gallery to:
Filter('app.database',LxWxD=Gallery3.Selected.Value)
Note: The name of our data source may be different, please use your data source name.
Best regards,
Rimmon Li
HI,
If your formula above works to get the data, then you can do the following:
Distinct( "Your formula" ),"The field to list")
Distinct function in Power Apps - Power Platform | Microsoft Learn