Option String

Option Strings are used in many tables to efficiently store yes/no (enabled/disabled) settings. These settings are represented in arrays, whose values are only 1 or 0. The position of the 1 or 0 determines what option has been enabled or disabled for the record.

A very common example, found in menu item definitions, is the menu level settings, which look like this:

"mainLevel": "11111111",

In this case, there are 8 main levels, each represented by a single digit. Since each digit is a 1, this Option String indicates that all 8 menu levels are enabled. If only menu levels 1 and 7 are enabled, the values will look like this:

"mainLevel": "10000010",

The easiest way to way with the options is to first configure a sample record using the Enterprise Management Console (EMC) and then export the data after saving the record.

Some endpoints support the ability to provide more detailed information on the options' meaning by including the <field nam>Ext data, as can be seen in the highlighted portion of the Auto Menu Level object shown below:

{
	"hierUnitId": 2,
      "hierUnitObjNum": 1,
	"hierUnitName":{
		"en-US": "Location 1",
		"es-SS": ...,
		"lt=LT": ...,
		....
	},
	"index": 1,
	"start": "10:00",
	"end": "18:00",
	"mainLevelIndex": 1,
	"subLevelIndex": 1,
	"options": "10000000",
	"optionsExt": {
		"activeEntry": false,
		"activeOnSunday": false,
		"activeOnMonday": false,
		"activeOnTuesday": false,
		"activeOnWednesday": false,
		"activeOnThursday": false,
		"activeOnFriday": false,
		"activeOnSaturday": false,
	}
}