Schema Predefined Values using UI

1. Schema Predefined Values

Predefined schema values allow users to set up values for each field in schema (number, string, GeoJSON, or other nested schema) and use them in policy while displaying request blocks. There are 3 types of predefined values:

  • Default Value - This value will be used in the document in the absence of user input. I.e. Guardian pre-populates the field with the Default Value which, if not changed explicitly by the user, would appear in the resulting document as if it was input by the user.

  • Suggested Value - This provides an example of the correct value a user could input into the field. Unlike โ€˜Default Valueโ€™ it is not inserted automatically into the document, it just serves as a visual aid for users filling out the form.

  • Test Value - This will be used for quick filling out the form for testing in Dry-Run mode. When the โ€˜Testโ€™ button is clicked all fields in the form which have associated โ€˜Test Valueโ€™ will be auto-populated with these values correspondingly, so the user can quickly proceed to the next step in the policy flow with valid test data in the resulting document.

1.1 Setting Predefined Values:

Predefined values can be found in the schema configuration dialog.

There is โ€œSelected valuesโ€ block and โ€œShow Moreโ€/โ€Show Lessโ€ button there.

1.1.1 Default value

The default value is the initial field value, which will be marked with gold color until it wonโ€™t be changed

1.1.2 Suggest value

The suggest value is the value, which will be suggested when field value is empty

1.1.3 Test Value

The test value is the value, which will be inserted after clicking on the โ€œTestโ€ button. It is only available in Dry-Run mode.

2. Complex cases

Predefined values can also be used in more complex cases such as multiple fields, nested schemas, geoJSON.

Last updated