Shortcode parameter example #
[wpda_app app_id="17" status="pending"]
The parameter status with the value pending is added to this shortcode.
Where clause example using shortcode parameter status #
where status = ifnull( shortcodeParam['status'], status )
In this where clause, the column status is compared with the value of the shortcode parameter using shortCodeParam[‘status’]. Null is returned if shortCodeParam[‘status’] is not available.
Shortcode parameters can be used 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
Examples #
where student_id = shortcodeParam['student_id'] and shortcodeParam['student_id'] is not null
where first_name like if(
shortcodeParam['student_firstname'] is null,
first_name,
concat( '%', shortcodeParam['student_firstname'], '%' )
)
Notes #
- Null is returned when no shortcode parameter with the given name is provided
- Values are sanitized and prepared automatically
- This feature is available to all users and does not require a premium license