Hi All,
I have a combo box(prjnames_3) which loads all the Projects from the SharePoint list. Below that I have a Practice label which loads when the value in the combo box is selected. It changes based on the Project selected. I have a gallery which sorts the Phases from a SharePoint list based on the Practice displayed.
This code gets the Practice from a list based on the Project names selected in the Combo box.
Set(varPractice ,LookUp(ProjectMaster_List,ProjectName = prjnames_3.Selected. Project Name, Practice.Value));
This code gets all the Phase names with respect to the Practice and compares with the varPractice where it is there above.
Clear(PracticeCollection);Collect(PracticeCollection, 'Practice Master');Clear(PhaseNameCollection);Collect(PhaseNameCollection,
Filter(Ungroup(ShowColumns(PracticeCollection,"Practice","PhaseName"),"PhaseName"),
!IsBlank(PracticeCollection)));
ForAll(
PhaseNameCollection,
If(
varPractice = Practice,
Collect(
Phasenames,
{id: Id,Phase: Value})));
All the above code is written on the On change property of the Combo box. so when Project is selected it will the get practice names which in turn gets the related Phase names and it must display the Phases values in the gallery.
The code on the items gallery is:
Distinct(Phasenames, Phase)
but the values in the gallery are not displaying properly based on the Practice instead displaying all the Phase values and filtering is not proper.
Any idea/suggestion on this.


Report
All responses (
Answers (