Hi @ximian ,
Do you want to change data source based on a variable?
Could you tell me:
1)where do you want to put this formula?
2)Are Status in 'Exceptions' list and Status in 'TestE' list both person type?
Based on your description, I think you want to put this formula in a combo box's Items.
If so, please do not use this kind of formula with If statement in a combo box's Items.
Because every time you change data source in combo box, it will reset the combo box.
You need to choose displayfield and searchfield for it when it is reset.
When you design the app, you have two data source, so you can not choose displayfield and searchfield for this combo box.
So the combo box will always display nothing.
Please only use one data source in one combo box.
What's more, since your field data type is person, I not suggest you save the two fields data in a collection neither.
Based on your demands, I figure out an alternative solution:
insert two combo boxes, decide the visibility of combo boxes based on the variable.
For example:
Insert two combo boxes.
Set combo box1's Items:
Choices([@'Exceptions'].Status)
set combo box1's Visible:
If(prd = "yes",true,false)
set combo box2's Items:
Choices([@'TestE'].Status)
set combo box2's Visible:
If(prd = "yes",false,true)
You could put combo box1 and combo box2 in the same position.
When prd value is "yes", combo box1 will be visible. Otherwise, combo box2 will be visible.
Best regards,