Hello,
i have a simple app with a textfield searchTextField and a gallery myGallery.
on the gallery item i have a simple code
Search(
AddColumns(
mySPList,
"UserName",
User.DisplayName
),
searchTextField.text,
"UserName",
"email",
"country"
)
and it works fine.
now i want to add some checkboxes to allow some sort of filtering to my gallery. I want to have one checkbox for Email, one for the Age and one checkbox for Country.
If no checkbox is set, the search must be done only in the UserName field, otherwise it should search also in the fields specified by the user with the checkboxes. For instance, if the user check email, the gallery should show the items searching the value inside the username and also the email.
how can i do that?
I figured i could put my search inside an if, but it would be way too many nested conditions. I tried to put the last field of the search function as a variable so i could "build" it, but it won't accept it.
Any clue?
thanks