I have to implement something like, A column employee we have three choices like EmpA, EmpB, EmpC and for each sub choices have almost 3-4 choices, can we link particular choice value to the another choice.
Loading
I have to implement something like, A column employee we have three choices like EmpA, EmpB, EmpC and for each sub choices have almost 3-4 choices, can we link particular choice value to the another choice.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jayraj ChhayaRank #304 · 8.2K reputationPosted Apr 1, 2024, 4:59 AM EDT
In Power Apps, you can achieve the desired functionality by utilizing cascading dropdowns. By creating relationships between the main choices (EmpA, EmpB, EmpC) and their corresponding sub-choices, you can dynamically update the available options based on the selection made. This involves setting up dependent dropdowns where the options in the second dropdown change based on the selection in the first dropdown.
// Assuming you have two dropdown controls: Dropdown1 for main choices and Dropdown2 for sub-choices // Set the Items property of Dropdown1 to the main choices Items = ["EmpA", "EmpB", "EmpC"] // Set the Items property of Dropdown2 to the sub-choices based on the selection in Dropdown1 Items = If(Dropdown1.Selected.Value = "EmpA", ["SubChoice1", "SubChoice2", "SubChoice3"], If(Dropdown1.Selected.Value = "EmpB", ["SubChoice4", "SubChoice5", "SubChoice6"], If(Dropdown1.Selected.Value = "EmpC", ["SubChoice7", "SubChoice8", "SubChoice9"], [])))By implementing cascading dropdowns in this manner, you can link specific choices to their corresponding sub-choices effectively within your Power Apps canvas app.
Jithu ThomasRank #437 · 5.7K reputationPosted Apr 1, 2024, 5:00 AM EDT
Absolutely! You can link choices in a Power Apps canvas app to achieve the desired cascading functionality for your employee and sub-choice selection. Here's how to implement it:
1. Data Source:
2. Create the Choices:
3. Define Choice Options:
Itemsproperty to a static list of choices:["EmpA", "EmpB", "EmpC"]4. Dynamic Sub-Choices based on Employee Selection:
Here's the key step for linking choices: Set the
Itemsproperty of the Sub-Choices dropdown dynamically based on the selected employee in the Employee dropdown. Use theFilterfunction to achieve this:Filter( YourDataSource, // Replace with your data source name Employee = EmployeeDropdown.Selected.Value // Reference the Employee dropdown value ) .SubChoices // Replace with the name of the sub-choice column in your data sourceExplanation:
Employeefield matching the selected value from the Employee dropdown.SubChoicescolumn (replace with your actual column name) from the filtered data, providing a dynamic list of sub-choices specific to the chosen employee.5. Cascading Updates (Optional):
OnChangeevent of the Sub-Choices dropdown and access theSelected.Valueproperty.Additional Tips:
BorderColor,Fill, and other styling properties.Example with a SharePoint List:
Assuming you have a SharePoint list with columns
EmployeeandSubChoices, here's an example of theItemsproperty for the Sub-Choices dropdown:Filter( SPListName, // Replace with your SharePoint list name Employee = EmployeeDropdown.Selected.Value ).SubChoicesBy implementing this approach, you'll create a dynamic selection experience in your Power Apps canvas app, where the sub-choices adjust based on the chosen employee.