Custom Form Data Searching
The following will outline the process of searching custom form data within the system.
Before beginning the process of searching in custom form data, you should use the following searches to acquire information about the form you would like to search.
Search For Custom Forms - AllThis first endpoint will return an array of all active forms in the organization. (True is the boolean value for active in this url).
The response will return some pertinent information about the form including the schema, id, and model type id.
Note the form id and the modelTypeId. The id will be used later in searching, and the model type is important so that the search is run against the correct entity - case, item, or person.
In order to see the model types, use this endpoint:
This returns an array of model types used throughout the system.
Search For Custom Forms - By Model Type (Form Type)Forms can also be searched by form type.
The form type is the id to the corresponding model type.
4 = cases
5 = items
11 = people
0 = all
This will return an array of all case custom forms.
Search For Custom Forms - By IdForms can also be searched by their.
Here is the response for a form we will use for our first search:
The most important information here is in schema => fields.
For this example we will be concerned with the type (text), and the name (field5617).
Searching Within A Custom Form - Text Field
From the above example, we will be doing a people search within the Person Form Test custom form.
Here is the endpoint we will be using:
The search parameters we will be supplying will be in the body of the post.
Note - "formId" is the id of the form we are searching.
"name" is the field we are searching in
"model" is the value we are searching for
This returns an array of person records that have "Powdered Sugar" as a value in the Test Text Box of Person Form Test custom form:
Another note in the search body of our POST is the "searchJustForm". If true, this will return all people in the system that have this attached custom form. So making that one change to the body of my post, I will get back the following:
Now we have 18 records returned, and the value stored for the field does not matter. All person records with the form will be returned.