1
votes

Created a simple app to keep track of the company fax numbers. In my header I have a search box where I want user's to search either by First Name, Last Name or both First and Last Name. I added the below to Query Builder

firstName contains? :SearchText or lastName contains? :SearchText

Searching by first name or last name works just fine. How can I search by both first and last name? Right now when I search by both I get no results. Thanks.

1

1 Answers

1
votes

"User Picker" widget should be a good fit for your case.

If you want to keep custom employees model please consider the following options:

  1. Add Name field ("FirstName LastName") so contains operator would give expected result
  2. Switch datasource to Query Script and process search query (https://developers.google.com/appmaker/models/datasources#query_script)