All app types, except data apps, are supporting HTTP GET and HTTP POST parameters in:
- The default where clause of the Table Builder for data tables and data administration apps
- The default where clause of the Map Builder for maps
- The query specified for charts in the App Manager data source section
The variables listed below can be used as URL parameters:
- httpGet[‘param_name’]: Returns the value of parameter param_name for an HTTP GET request
- httpPost[‘param_name’]: Returns the value of parameter param_name for an HTTP POST request
- httpRequest[‘param_name’]: Returns the value of parameter param_name for an HTTP GET and POST requests
Examples #
Show only rows for a specific student.
where student_id = httpPost['student_id'] and httpPost['student_id'] is not null
Use httpGet to use a URL parameter in a query. URL example: YOURDOMAIN.com/?student_id=1
where student_id = httpPost['student_id'] and httpPost['student_id'] is not null
Add a like condition using if.
where first_name like if(
httpGet['student_firstname'] is null,
first_name,
concat( '%', httpGet['student_firstname'], '%' )
)
Show only rows for a specific student when parameter student_id is present or all rows if parameter student_id is not present.
where student_id = ifnull( httpPost['student_id'], student_id )
Notes #
- Null is returned when no argument with the given name is found
- Values are sanitized and prepared automatically
- Parameter names must be written and defined in lowercase characters.
- This feature is available to all users in the App Builder and no longer requires a premium license