Hello,
I have 2 ComboBoxes.
Data Source is a SharePoint Choice Field.
Trying to write an IF Then Statement, but having issues.
Part of me suspects it is due to the "Complex" column issue.
Essentially trying to write if "Not Required" Selected then "Not Required" or Selected Item Value
Combobox20 and ComboBox21
Default for Combobox21
IF(DataCardValue20.Selected.Value = "Not Required", "Not Required","DataCardValue21.Selected.Value")
Learning the intricacies of complex columns is frustrating at times.
Any insight?
Solved! Go to Solution.
Hi @kgordish ,
Could you tell me:
If my assumptions are correct, the point is to use the DefaultSelectedItems property of the combo box control.
I've made a test for your reference:
1\ This is my list “LIST31”.
2\ Set the DataCardValue21’s DefaultSelectedItems property to:
If(DataCardValue20.Selected.Value="Not Required",{Value:"Not Required"},First(Choices(LIST31.ComboBox21)))
3\ The result is as follows:
Best Regards,
Wearsky
Follow Up.
I had issues with formula above. Previously saved data was not showing in the app.
After trial and error this formula works.
If(DataCardValue20.Selected.Value="Not Required",{Value:"Not Required"}, (ThisItem.'Name of SharePoint Column'))
Hi @kgordish ,
Could you tell me:
If my assumptions are correct, the point is to use the DefaultSelectedItems property of the combo box control.
I've made a test for your reference:
1\ This is my list “LIST31”.
2\ Set the DataCardValue21’s DefaultSelectedItems property to:
If(DataCardValue20.Selected.Value="Not Required",{Value:"Not Required"},First(Choices(LIST31.ComboBox21)))
3\ The result is as follows:
Best Regards,
Wearsky
@v-xiaochen-msft
Thank you for the clue. The formula I am using below seems to work just fine.
I was editing default instead of defaultselecteditems.
Left: Combobox20; Right: Combobox21
Instead of First(Choices...) I used Defaults formula. That way the default for ComboBox21 was not set to "Not Required" when ComboxBox20 had nothing selected due to the First Choice.
I used If(DataCardValue20.Selected.Value="Not Required",{Value:"Not Required"},Defaults('Test Drop Down'.Function_Status))
Follow Up.
I had issues with formula above. Previously saved data was not showing in the app.
After trial and error this formula works.
If(DataCardValue20.Selected.Value="Not Required",{Value:"Not Required"}, (ThisItem.'Name of SharePoint Column'))
User | Count |
---|---|
227 | |
98 | |
95 | |
56 | |
33 |
User | Count |
---|---|
279 | |
108 | |
107 | |
64 | |
62 |