Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Joget Marketplace has a free JSON Form Options Plugin to use JSON to populate Form Select Box, Check Box or Radio Buttons.

Image Modified

JSON Tool Properties

Configure JSON Tool

Image Removed

Figure 1: Configure JSON Tool
NameDescriptionScreen (Click to view)
JSON URLURL to be called.
Call Type

Select the call type:

  • GET
  • POST

GET requests include all required data in the URL. GET is less secure compared to POST because data sent is part of the URL. So it's saved in browser history and server logs in plaintext.

In contrast, HTTP POST requests supply additional data from the client (browser) to the server in the message body. POST is a little safer than GET because the parameters are not stored in browser history or in web server logs. From here.

POST Method

(Call type = POST)

Select the post method:

  • POST Parameters
  • POST Parameters as JSON Payload
  • Custom JSON Payload

POST Parameters

(Call type = POST)

When POST Method is set to "POST Parameters", these parameters will be sent as a UrlEncodedFormEntity.

When POST Method is set to "POST Parameters as JSON Payload", these parameters will be sent as a StringEntity in a form of an escaped JSON string.

Custom JSON Payload

Write your own JSON to be the payload. It will be sent as a StringEntity.

This option is available only when "Custom JSON Payload" in selected.

Request HeadersAdd name(s) and value(s) to the request header.
No Response Expected

Check if no response is expected, so that even if there is a response, this tool will simply ignore it.

Using this option will also disable "store to form" and "store to workflow variable" properties.

Debug ModeShow relevant debug entries in the server log for debugging purposes.

Image Added

Figure 1: Configure JSON Tool

Store To Form

Image Removed
NameDescriptionScreen (Click to view)
FormSelect target form to store data to.

Figure 2: Store to Form

Base JSON Object Name for Multirow DataName of the object that contains an array to be based on.
Field Mapping

Mapping with JSON data with Form fields.

NameDescription
Field NameForm field ID
JSON Object NameJSON property name

Image Added

Figure 2: Store to Form

Store To Workflow Variable

Screen (Click to view)Image Removed
NameDescription
Workflow Variable Mapping
NameDescription
Workflow VariableWorkflow Variable Name.
JSON Object NameJSON property name.

Image Added

Figure 3: Store to Workflow Variable


Notes On JSON Returned Data

...

Code Block
langjavascript
titleSample JSON Returned Results
{
	"apps": [
		{
			"name": "App Center",
			"userviews": [
				{
					"name": "Joget DX",
					"id": "v",
					"version": 1,
					"url": "/jw/web/userview/appcenter/v"
				},
				{
					"name": "Joget DX Platform",
					"id": "v2",
					"version": 1,
					"url": "/jw/web/userview/appcenter/v2"
				}
			],
			"id": "appcenter",
			"version": 1
		},
		{
			"name": "Customer Relationship Management",
			"userviews": [
				{
					"imageUrl": "/jw/web/app/crm/resources/crm_icon.png",
					"name": "Customer Relationship Management",
					"id": "crm_userview_sales",
					"version": 1,
					"url": "/jw/web/userview/crm/crm_userview_sales"
				}
			],
			"id": "crm",
			"version": 1
		}
	]
}


Image Modified
Figure 4: Download the demo app below to view how JSON TOOL is used in run process to populate form records

Download Demo App

...