Service Forms can be initialized by invoking GET /api/serviceform/{id}.
The Id of a form can be obtained using the rule tester and the function ServiceForm("Name")
.
GETting a service form initializes an instance of the form and returns JSON representing the form state, including data source listings and default values. It does NOT persist the form instance in the database. If a form is started and not submitted nothing is recorded except the request access log.
Request Parameters (apply to both GET and POST requests)
- identity: opt. not all forms should bind to an identity. If specified, should be the guid representing an object in that identity object's parent silo
- self: binds the form to the current logged in user
- filter: Filter to query for an objectrecord to bind to the form. NOTE: only the first matched object will be bound to the form. See Filter query instructions
- step: opt. In a multi-page form it is possible to specify a specific page in the form to go to, provided earlier pages on the form have valid data bound to them already
- code: If a form instance has been previously started and POSTed by an authorized user, and if that form has anonymous cipher links enabled, and if the link is within the valid expiration time, the code property may be used to load that form instance. When a form is accessed with a cipher code the authorization of the user that started the form is used, and the form may be accessed anonymously without being logged in.
- saveState: will put a submitted form instance in a save-for-later state that can be returned to by the submitting user.
- *input: If additional query parameters are provided, and if they match the name of an input in the form (case-insensitive) the input values will be bound based on the query parameter value
Authorization
Access to forms is authorized by Audience rules, not the usual Identity Panel data permissions. The application must be licensed for Identity Panel, and a form must be specified with audiences enabled.
Audiences can be role based (e.g. Admin, User, Service Desk) or relationship based (e.g. manager, self). Audience rules also allow Filters to be defined to restrict the access scope beyond that's implied by the rule itself.
Audiences can be applied at the form level, and at the level of form sections.
Form Submission
Form data can be submitted posting ServiceFormState to the same URI used to retrieve the form. It is NOT necessary to GET the form first if a valid form submission can be constructed. See PowerShell form submission example.
Comments
0 comments
Please sign in to leave a comment.