Overview

The built-in WebData Editor allows you to define the data structure for JSON, XML, HTML, and text content.

The Encoding drop-down menu is read-only on the WebData Editor. The definition of the data format must be made when creating the WebData object.

On this page:


Selecting the WebData Object

  1. Go to Reports / WebData and select one object in the Table or Create a new one.
  2. Go to Reports / Web Data Editor. The selected WebData content will be used by the editor.

In order to select other documents, or create new ones, the ComboBox and the Document Toolbar on top of the editor can be used. 


Editing the Content

Adding Binding to Real-Time Tags

When reading the file with the Data (or sending to a WebService), you replace parts of the text by Tags. To do that, surround the tag name with curly brackets.

Eg.:   Replace "Name" :  "John Robinson" by  "Name" : "{Tag.MyTagWithTheName}"

The value of Tag.MyTagWithTheName will be used when reading the file or data package.

When loading files from disk, or receiving data packages from WebServices, the operation is reversed. If Tags are used, they will be populated with contents after parsing the contents of the received data.

In case of populating tags with received data contents, when using tags in JSON properties that contain another internal JSON, the content of the JSON, including all its properties, will be assigned to the tag.

Eg.: 

WebData Editor Content:

{
	"slip": "{Tag.Advices}"
}

Received Data:

{
	"slip": {
		"id": 175,
		"advice": "Plant a tree."
	}
}

The tag "Advices" will receive the value:

{
	"id": 175,
	"advice": "Plant a tree."
}

Best Practices for Document Formatting

Proper formatting of WebData documents helps ensure that tag binding works as expected and that queries execute correctly.


In this section:

  • No labels