Hi John,
Apologies for the "code gymnastics" here, but if you want all your list back, while getting distinct values (and maintaining some form of Delegation on the exercise), one way is to split it up as below. Note that the top filter (wList) needs to output record numbers under your Delegation Limit (Distinct also has this limitation) for you to get all the records
With(
{
wList:
Filter(
'Warehouse';
'RecordAssigment'.Id_record = Dropdown1.Selected.Result &&
StartsWith(
'Description ';
TextInput1.Text
)
)
};
With(
{
wGroup:
AddColumns(
GroupBy(
wList;
"Description";
"Data"
);
"ID1";
First(Data).ID
)
};
Filter(
wList;
ID in wGroup.ID1
)
)
)
------------------------------
Warren Belz
MVP (Business Applications)
Australia
------------------------------
Original Message:
Sent: Dec 01, 2022 01:21 PM
From: John Doe
Subject: How to avoid displaying repeated data in a gallery
I have a gallery in which I am showing data from a dropdown, when selecting an item from the dropdown the gallery is loaded with the corresponding data.
To display the data in the gallery I make use of the Items property in which I make use of the following formula:
Filter(
'Warehouse';
'RecordAssigment'.Id_record = Dropdown1.Selected.Result;
StartsWith(
'Description ';
TextInput1.Text
)
)
What I want to avoid is that repeated data is displayed in my gallery, the following is an example of the data list, I want to avoid showing repeated data such as "Germany" or "Spain".
Description: "United Kingdom",
Description: "Germany",
Description: "Spain",
Description: "Germany",
Description: "Spain",
Description: "Germany"
I tried adding the Distinct function to the Items property of the Dropdown, but it didn't work.
Distinct('Warehouse';'RecordAssigment'.Id_record)
Someone knows that another function I can use to prevent the data from repeating.
------------------------------
John Doe
------------------------------