Home > Mobile >  Power Apps find function only working with exact match on form
Power Apps find function only working with exact match on form

Time:03-16

I have a power app form that is populated from a sharepoint list. On the form I have a combo box called cmb_InducteeType. I wish to hide/show certain form items dependent on whether that combo box contains the string "staff". The combo box options are "Staff", "Student", or "Visiting Staff". So if "Staff" or "Visiting Staff" is selected various form elements should be made visible. The thing that is driving me crazy is the the find function only seems to work if the text to be searched is an exact match to the 'within text'.

so, if cmb_InducteeType.Selected.Value is "staff" Find(Lower(cmb_InducteeType.Selected.Value), "staff") returns 1 - OK

if so, if cmb_InducteeType.Selected.Value is "visiting staff" Find(Lower(cmb_InducteeType.Selected.Value), "staff") returns blank - Not OK, I think it should re turn 10

and if cmb_InducteeType.Selected.Value is "visiting staff" and I change the 'within text' to "visiting staff" Find(Lower(cmb_InducteeType.Selected.Value), "visiting staff") returns 1 - which is OK also.

So basically, It only works with exact matches, which kind of defeats the purpose of the function.

Can somebody please tell me what I am doing wrong

Thanks

CodePudding user response:

You need to reverse the parameters in your formula :

Find( "staff"; Lower(cmb_InducteeType.Selected.Value))

enter image description here enter image description here

Have a good day

  • Related