Create a data type called employee…on that data type add a data field called “Employee ID” make it a text type.

Then on a page where you want to search for the employees, you add an input element that allows a user to add an employee ID value into the input…make the input type text.

Then you need a repeating group that is of type employee with the datasource set to ‘do a search for employees’ and put a constraint onto it that is “employee ID = inputs value”…so this will return a list of employees that have that employee ID…

Or if you want to make sure it is only ever a single employee…create a group, make the type employee, and datasource is same as above, however, you would add to the dynamic expression at the end :first item so that you would only get the first employee in the database that has that employee ID.

Alternatively, if you want to allow users to search for employees by more than the employee ID alone, you can add other data fields to the employee data type such as first name, last name, department etc. and make them text types. Then when you do a search for employees you would use the constraint ‘any field = inputs value’

Then you would be able to search the employee data type and restrict the results based on any text field that has the value entered into the input element.

1 Like