Lets say that I have list of choices called "Source1", "Source2", "Source3", "Source4" and "Source5" in my combobox. When I choose "Source1", I want that the value of my label1 to set to 100. When I choose for example "Source1" and "Source2" I want to have 2 labels where label1 will be 100 because I have chosen source1 and label2 will be 200 because I have chosen also source2.
I tried to do it changing OnChange property of the combobox, putting here next things
UpdateContext({ItemVal1: If(chbsources.Selected.Value= "Source1";100;0)});;
UpdateContext({ItemVal2: If(chbsources.Selected.Value= "Source2";200;0)})
where ItemVal1 is text value of label1 and ItemVal2 is text value of label2.
But I didn't get result that I want.When I chose Source 1 and Source 2 I wanted to have 2 values where label1=100 and label2=200. But I got label1=0 and label2=200
. How can I do it?