I have a PowerApp ticketing system (kinda like a bug tracker) that's based on a SharePoint list. There are two fields in the list that this question is about.
Watchers
- Type: Person of Group
- Multi-select allowed
- In the EditForm, I'm using a ComboBox with 'Select Multiple = ON' and 'Allow Searching = ON'
Department
- Type: Lookup
- Based on another SP list with two columns: Title (Text) and Manager (Person).
- This column displays Title, which is the Department Name.
- Single-select
- In the EditForm, I'm using a ComboBox with 'Select Multiple = OFF' and 'Allow Searching = ON'
In normal operation, the 'Watchers' field is so that someone can 'tag' a person in a ticket in my system. However, while keeping that functionality I would also like to make it so that whenever the user selects a department, that department manager is added to the 'Watchers' field.
In my EditForm, in the corresponding data card, I set the Watchers combo box items to the Watchers filed in my list.
WatchersComboBox.Items = Choices([MyTicketList].Watchers)
Then set the default value as follows:
WatchersComboBox.Default =
LookUp(
'EquipmentData-Departments', // This is the above mentioned secondary list the Department column of my list is based on
ID = dcvDepartment.Selected.Id,
Manager
)
I expected this to set the value of the WatchersComboBox whenver a selection is made from the Department combo box, but that doesn't happen.
By using a text table, I did verify that when a department selection is made, the LookUp function works and that I can pull the correct manager from the said secondary list.
MyTextLabel.Text =
LookUp(
'EquipmentData-Departments',
ID = dcvDepartment.Selected.Id,
Manager
).DisplayName
So, what's the catch here? Why am I not getting the Watchers list updated properly?