Hello everyone, I'm currently building an App which tracks a recurring project in my organisation. There are about 15 different small phases in this project, which are stored in a combobox on a sharepoint list. My Power App uses the onselect of a checkmark button to trigger my variable "var" to be updated to true.
The If-formula inside of the defaultselecteditems of the combobox (On that screen) is:
If(var= false;ThisItem.Comboboxfield;LookUp(Choices([@SharePointList].Comboboxfield);Value="NextComboboxchoice"))
The NextComboboxChoice refers to the status that is assigned to the project if everything goes as planned (You could see it as a continuation of the "positive" path for the project). The variable var I created can be either true or false.
Now I'd like to implement a second variable into this formula, let's call it varFail, which sets the combobox choice to a "failed" choice (With different choices for "fails" later in the process). How could I do this? Is it possible within one If-formula?
Hi,
If I understand you correctly, you want your formula to evaluate both varFail and var. If so, you can use the functions And() or Or() to test both simultaneously. You can also nest If-formulas as shown below.
If(
And(var = false, varFail = false),
ThisItem.Combo...,
If(
var = false,
ThisItem.Combo...,
If(
var = false,
ThisItem.Combo...,
IfFalse
)
)
)
Well kind of, I would like the default selected item to show a specific option in the combobox, if var is switched to true by the selection of a button. However if varFail is switched to true, I would like the defaultselecteditem to be another (negative) choice. Therefore I'm looking for an If-Statement that checks both variables and if one of them is true, the defaultselected item changes to one of the options that I want to be displayed
User | Count |
---|---|
251 | |
125 | |
107 | |
50 | |
49 |