Import and Export Excel file User Guide
Last updated
Last updated
The βImport/Export schemas from/to Excelβ UI menu options trigger the process of seamless transformation of schemas written in Excel into valid Guardian JSON schemas, and vice versa. The content of such schema excel files must conform to the format presented in the template accessible via the corresponding button on the 'Policy Schemasβ page. The menu options for actioning Import and Export are accessible via the βManage Policiesβ and βPolicy Schemasβ pages.
In Guardian schemas usually exist within a Policy, a Tool or embedded into another schema. To ease the process when a schema or a set of schemas are imported, they get imported into a context of a policy. Users can create a new empty policy for such purposes or use an existing policy. In the latter case all existing schemas in the policy are preserved (and can be manually deleted later), new schemas are added together with the basic policy blocks scaffolding which is inserted at the beginning of the policy flow.
When schemas are exported, they are packaged into a single Excel file formatted like the template mentioned above. It is recommended to experiment with exporting your existing policies and reviewing the resulting excel files so you can familiarize yourself with the format and the content.
Use the corresponding menu option : Import schemas from Excel in the Manage Policies or Policy Schemas pages.
Import section pops up where we need to upload .xlsx file:
In case, when the importing engine was unable to parse the content of the given excel file then Guardian indicates the existence of the problem to the user, and gives an option to skip the invalid part to continue importing by clicking on Skip & Import button:
In cases, where the importing engine was not able to parse the content of a field then Guardian would specifically highlight this field in the schema after the import in red color rows:\
Importing schemas into a Guardian policy will result in a number of new autogenerated blocks appearing in the beginning of the policy flow which βholdβ each imported schema and its tool or form as shown in the screenshot below.
Guardian provides a basic downloadable Excel schema template which contains all possible types and structural elements supported by the system for importing. This template can be downloaded by clicking on the button highlighted in screenshot below:
All schemas created for importing into Guardian must follow the design of the template containing the following elements:
Schema name β unique schema name (also used in the name of the page and is limited to 30 characters)
Description (optional) β schema description
Schema Type β the value in this field influences the type of the signature and additional system fields
Verifiable Credentials (VC) β linked to the policy and can be used in forms.
Encrypted Verifiable Credential (EVC) β linked to the policy and can be used in forms. Unlike a simple VC it gets encrypted when saved into IPFS.
Sub-Schema (None) β schemas without additional system fields which are suitable for embedded data.
Tool (optional) β name of the Tool to which this schema belongs
Tool Id β message id of the Tool to which this schema belongs (if relevant)
Note: If the imported schema belongs to a Tool (not a Policy) - i.e. there is a Tool ID setting as per above - all extended information about the schema will not be processed during import. Since Tools are immutable and can only be referenced the only relevant information that would be used in the import is the Tool ID.
Table listing each field which the schema contains.
Note: The order of the columns in the spreadsheet is irrelevant.
Required Field - this field must be filled our (Yes/No)
Field Type β type of the data matching that of Schema concepts in Guardian
Enum
Number
Integer
String
Pattern β text field (String) which gets validated against the specified pattern
Boolean
Date
Time
DateTime
Duration
URL
URI
Image
Help Text
GeoJSON
Prefix
Postfix
HederaAccount
Auto-Calculate
Sub-schema name β the name of the embedded schema (or the name of the tag in the spreadsheet)
Parameter β additional field for information relevant for some data types
Enum β name of the enumeration (or the name of the tab in the spreadsheet) - list of possible options
Pattern β regular expression
Help Text β text style
Prefix β symbol
Postfix β symbol
Visibility β determines the visibility of the field for user