Difference between revisions of "Prefill Form Fields"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 8: Line 8:
</a></b></tt>
</a></b></tt>
|}
|}
: ''Note:<br>Line breaks have been added for readability.'' The URL must be a single contiguous string.
:: ''Line breaks have been added for readability.'' The URL must be a single contiguous string.


:In this example:
:In this example:

Revision as of 22:53, 30 July 2013

By creating the appropriate URL, you can take a registered platform user to a Form that has select fields pre-filled with default data. For example, you could put a link to that URL on a JSP page, and even JavaScript to acquire the data from other sources.

Example
This HTML code displays a "Click here" link in a JSP page. When clicked, the user is directed to a form that has two fields pre-filled.
<a href="https://processing.mycompany.com/networking/servicedesk
      /index.jsp?applicationId=
123456789#_Claims
      /new/_form_title=Agent+Form/priority=1/status=Pending">
  Click here
</a>
Line breaks have been added for readability. The URL must be a single contiguous string.
In this example:
  • domain = processing.mycompany.com
  • appID = 123456789
  • objectName = Claims
  • formTitle = Agent+Form ("+" replaces the space in the form name)
  • field #1 = priority, prefill value = 1
  • field #2 = status, prefill value = Pending
Syntax
https://domain/networking/servicedesk/index.jsp?applicationId=appID#_objectName
      /new/_form_title=formName/fieldName=value/...

where:

  • The underscore ("_") before the object name is required, as are the underscores in the keyword, _form_title
  • domain - The domain used to access the platform.
  • appID - The application ID, taken from the Application Properties.
  • objectName - The name of the Object, taken from the Object Information section of the Object Properties.
  • formName - The name of the form, taken from the Form Properties.
  • fieldName - The name of a Field that is displayed in the form.
  • value - The value to pre-fill.
Considerations
  • Only fields included in the form can be pre-filled. (Note that you can include hidden fields in a form, in order to include data that isn't immediately visible to the user.)
  • When examining a Form, you see field labels. But the internal field name must be specified in the URL.
  • For all parameter values, use "+" in place of a space.
    Example: 217 Jason Street becomes: 217+Jason+Street
  • Parameters must be specified in the order shown, separated by a slash ("/")
  • If a data value includes a "/", encode it using %2F.
    Example: either/or becomes: either%2For
Supported Fields
  • BOOLEAN (value should be either 1 or 0 )
  • CURRENCY
  • DOUBLE
  • GLOBAL_PICK_LIST
  • NUMBER
  • PERCENT
  • PHONE
  • PICK_LIST
  • RADIO_BUTTON
  • TEXT_FIELD
  • TEXT_AREA
  • TIME