My screen looks like
In Dropdowns i list out the name from the Datasource"Employee"
Items: ShowColumns(Employee, "Name", "ID")
Next To dropdown i add a Label to show the Id of the Selected dropdown
text: Dropdown1.Selected.Name & "" & Dropdown1.Selected.ID
both are works fine.
Now i have a duplicate values in the dropdowns. So i have to remove the Duplicates by giving formulas in Dropdowns. i tried but got error.
please tell me how to Code. Thanks.
Solved! Go to Solution.
Could you please share a bit more about your scenario, is there only one Dropdown, is it for 'Name' or 'ID'?
Based on the issue that you mentioned, do you want to remove the duplicates from the dropdown?
Since there are duplicates in your column, I assume that you have an Excel table as your data source.
I have a test on my side, please take a try as below.
Set the Dropdown Items property as below:
Distinct(ProductionProcess,NAME)
Add a Label and set the Text property as below:
LookUp(ProductionProcess,NAME=Dropdown1.Selected.Result,IDen)
After that, you can populate the Label based on the Dropdown selected without duplicate values.
If you want to populate a Gallery every clicking the Dropdown, you can set the OnSelect property of the Dropdown as below:
Collect(
Temp,
{
Name: Dropdown1.Selected.Result,
IDENTY: LookUp(
ProductionProcess,
NAME = Dropdown1.Selected.Result,
IDen
)
}
)
Add a blank Gallery and insert 2 Labels to it. Set the Text property as below:
NameLabel Text property:
ThisItem.Name
IDLabel Text property:
ThisItem.IDENTY
Please check the Gif as below.
Best Regards,
Qi
To remove duplicate use disctint.
Onvisible of the screen create a collection;
ClearCollect (EmployeeCol, AddColumns (Employee, "NameAndID", Name&ID))
Then on the Dropdown items:
Distinct(EmployeeCol, NameAndID)
on the Items property of the dropdown.
Finally in your Label;
Dropdown1.Selected.Result)
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Could you please share a bit more about your scenario, is there only one Dropdown, is it for 'Name' or 'ID'?
Based on the issue that you mentioned, do you want to remove the duplicates from the dropdown?
Since there are duplicates in your column, I assume that you have an Excel table as your data source.
I have a test on my side, please take a try as below.
Set the Dropdown Items property as below:
Distinct(ProductionProcess,NAME)
Add a Label and set the Text property as below:
LookUp(ProductionProcess,NAME=Dropdown1.Selected.Result,IDen)
After that, you can populate the Label based on the Dropdown selected without duplicate values.
If you want to populate a Gallery every clicking the Dropdown, you can set the OnSelect property of the Dropdown as below:
Collect(
Temp,
{
Name: Dropdown1.Selected.Result,
IDENTY: LookUp(
ProductionProcess,
NAME = Dropdown1.Selected.Result,
IDen
)
}
)
Add a blank Gallery and insert 2 Labels to it. Set the Text property as below:
NameLabel Text property:
ThisItem.Name
IDLabel Text property:
ThisItem.IDENTY
Please check the Gif as below.
Best Regards,
Qi
User | Count |
---|---|
126 | |
87 | |
85 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |