I am trying to set up a gallery search using text fields (Name & Age) and number field (ID which is a system column from a Sharepoint List). Age is a calculated field and has text content like this: "11 yrs 8 mos"
I have 2 search boxes, one for text (PTNameSearch) and one for number (PTIDSearch).
Here's my search logic: if PTNameSearch box is not blank, then search by Name & Age value else if PTIDSearch box is not blank then search by ID, else return all records.
If(!IsBlank(PTNameSearch.Value),
Search(SortByColumns('EMR PT Demographics',"ID"), PTNameSearch.Value,'Patient Name', Age),
If(!IsBlank(PTIDSearch.Value),
Filter(SortByColumns('EMR PT Demographics',"ID"),Value(PTIDSearch.Value),ID),
SortByColumns('EMR PT Demographics',"ID")))
The text search works fine, but the number search does not return a result.
What is wrong with my number search?
Thank you.