Schema Options Property

Schema columns support the _options$ property; this is a JSON-encoded set of valid options for the property displayed in the Schema column.

TIP: This is used to set attributes for the Edit Add-in for WebMap

Open the JSON editor by right-clicking on the schema and navigating to Options.

The JSON dialog has the following control buttons:

OK

Confirms any changes and closes the dialog.

Cancel

Closes the dialog with no changes saved.

Validate

Checks the JSON and returns any errors at the appropriate place in the code for example Missing a comma or "}" after an array element.

Format

Converts unformatted code into JSON format:

( ... )

Highlights the block of code at the position the cursor is placed:

The _options$ property of a schema defines a list of values that can be selected from the Properties Control Bar.

In this example the RatingValue& property will have the five possible values defined in the JSON:

In this example "Good" is selected from the drop-down therefore a Rating Value of 4 will be added to the list of Attributes:

Here is an example of food ratings 1 to 5 of establishments in an area. The rating numbers correspond to descriptive text; in the range "Major Improvement Necessary" to "Very Good".

The following JSON defines these ratings and their corresponding descriptive text:

Copy
{
    "Options": [
        {
            "Label": "Major Improvement Necessary",
            "Value": 0
        },
        {
            "Label": "Improvement Necessary",
            "Value": 1
        },
        {
            "Label": "Generally Satisfactory",
            "Value": 2
        },
        {
            "Label": "Good",
            "Value": 3
        },
        {
            "Label": "Very Good",
            "Value": 4
        }
    ],
    "Mandatory": true,
    "Default": 3
}

The Default parameter above can only be used inside the Edit Add-in for WebMap.