Hello all.
So I have a screen on an app that looks like this:
The problem I am having is that the AssigneeTriggerColumn (which is a choice column in a SharePoint list called Hazards) is not auto-filling with options. How it works is:
When I load into the page, the value is immediately on "AssigneeTriggerColumn" is set as NewPlusOne, which is expected behaviour. However when I populate either the CurrentAssignee or SecondAssignee boxes, the AssigneeTriggerColumn dropdown doesn't change. It only changes when the value is removed from the column - the AssigneeTriggerColumn starts auto-filling as expected. I just want to know why it starts working properly, but only after I remove the values?!?! Below is my code:
//Auto-fill with a choice, dependant on what boxes have values
If(IsEmpty(SecondAssigneeBox.SelectedItems), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="NewAssignee"), If(IsEmpty(CurrentAssigneeBox.SelectedItems), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="SecondAssignee"), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="NewPlusOne")))
Please help! Thank you 😊 - also, feel free to ask me any questions about the app if you need any clarification on anything!
Hi @jojos_iq,
The Value part is a paticular format of the Choice column to set the DefaultSelectedItems property of the ComboBox.
Generally, we will format as below:
{Value:Specific_Value_Form_Choice_Field}
The ComboBox does not allow multiselect and I have tried your code - it worked!
My day has only just started, but you have just made it 😊 - thank you so much! Could I ask you what the value part of the formula refers to? I don't really understand everything between the curly braces.
Hi @jojos_iq,
Could you please tell me that if both ComboBox allow multi select or not?
If sometimes you only select one item, the following formula could work:
If(IsBlank(SecondAssigneeBox.Selected),{Value:"NewAssignee"},IsBlank(CurrentAssigneeBox.Selected),{Value:"SecondAssignee"},{Value:"NewPlusOne"})