Hi @WarrenBelz!
Thank you for your input. With your help I was able to achieve the desired functionality (albeit maybe not so efficiently).
However, I've encountered a problem where every time a change has been made in any of the ComboBoxes, they automatically close (for example I select 1 item from the list and the comboBox closes, and to input another option I have to open the comboBox again).
All the code that i've written is as follows:
1. OnVisible property of the screen: ClearCollect(
PrimarySkillsCollection,
Sort(
Choices([@SPList].'Primary Skills'),
Value,
SortOrder.Ascending
)
);
ClearCollect(
PrimarySkillsCollection,
Sort(
Choices([@SPList].'Primary Skills'),
Value,
SortOrder.Ascending
)
);
ClearCollect(
SecondarySkillsCollection,
Sort(
Choices([@SPList].'Secondary Skills'),
Value,
SortOrder.Ascending
)
);
ClearCollect(
SelectedPrimarySkills,
CP_DataCardPrimarySkills.SelectedItems.Value
);
ClearCollect(
SelectedSecondarySkills,
CP_DataCardSecondarySkills.SelectedItems.Value
)
2. OnChange property comboBox1 (Primary skills): ClearCollect(
SecondarySkillsCollection,
If(
IsEmpty(CP_DataCardPrimarySkills.SelectedItems),
Choices([@SPList].'Secondary Skills'),
Filter(
Choices([@SPList].'Secondary Skills'),
Not(Value in CP_DataCardPrimarySkills.SelectedItems.Value) && Not(Value in CP_DataCardSecondarySkills.SelectedItems.Value)
)
)
);
ClearCollect(
SelectedPrimarySkills,
Filter(
Choices([@SPList].'Primary Skills'),
Value in CP_DataCardPrimarySkills.SelectedItems.Value
)
);
3. OnChange property comboBox2 (Secondary skills): ClearCollect(
PrimarySkillsCollection,
If(
IsEmpty(CP_DataCardSecondarySkills.SelectedItems),
Choices([@SPList].'Primary Skills'),
Filter(
Choices([@SPList].'Primary Skills'),
Not(Value in CP_DataCardSecondarySkills.SelectedItems.Value) && Not(Value in CP_DataCardPrimarySkills.SelectedItems.Value)
)
)
);
ClearCollect(
SelectedSecondarySkills,
Filter(
Choices([@SPList].'Secondary Skills'),
Value in CP_DataCardSecondarySkills.SelectedItems.Value
)
);
4. Items Property comboBox1: If(
IsEmpty(PrimarySkillsCollection),
Choices([@SPList].'Primary Skills'),
Distinct(
Filter(
Choices([@SPList].'Primary Skills'),
Not(Value in SelectedSecondarySkills.Value) || Value in SelectedPrimarySkills.Value
),
Value
)
)
5. Items property comboBox2: If(
IsEmpty(SecondarySkillsCollection),
Choices([@SPList].'Secondary Skills'),
Distinct(
Filter(
Choices([@SPList].'Secondary Skills'),
Not(Value in SelectedPrimarySkills.Value) || Value in SelectedSecondarySkills.Value
),
Value
)
)
DefaultSelectedItems property ComboBox1: If(
IsEmpty(SelectedPrimarySkills),
Parent.Default,
SelectedPrimarySkills.Value
)
DefaultSelectedItems property ComboBox2: If(
IsEmpty(SelectedSecondarySkills),
Parent.Default,
SelectedSecondarySkills.Value
)
Any help or suggestions as to what i'm doing wrong would be greatly appreciated!