Show TOC

Procedure documentationDefining the Data Types of Schema Elements Locate this document in the navigation structure

 

You use data types to validate user input in the Edit form. If authors choose the function for saving in the Edit form, the system checks whether the data in the input fields has a valid format for the data type of the referenced schema element. It prompts users to correct their entries if this is not the case.

For some data types, the system can complete entered data. For example, if you enter the character string www.sap.com into an input field with the data type URL, the system adds the HTTP protocol, thereby completing the URL (http://www.sap.com).

By default, data schema elements have the data type String. This means that any character string can be entered.

Procedure

To assign a data type to a schema element, select the schema element in the tree view and select a value from the dropdown box on the Type tab page.

Caution Caution

If you change the data types of schema elements later on, this can result in old XML documents containing non-permitted data.

End of the caution.
Data Types for Schema Elements

Data Type

Permitted Values

url

A valid URL has the following format:

protocol://host[:port][file[query][anchor]] or

host[:port][file[query][anchor]]

If you do not specify a protocol, the system adds "http://". You must specify at least host or file. The other elements are optional.

Only letters (A-Z, a-z) are allowed in protocol. Length: at least one character.

Letters (A-Z, a-z), digits, and dashes ("-") are allowed in host. It may comprise several sections that are separated by a dot ("."). Such sections may not begin or end with a dash. Each section must have a length of at least one character.

Only digits are permitted in port. Length: at least one, maximum of five digits.

file is a character string beginning with a slash ("/") and followed by letters and digits in any order. The following characters are also permitted in file:

  • Slash ("/")

  • Tilde ("~")

  • Dot (".")

  • Underscore ("_")

  • Hyphen ("-")

  • Percent ("%")

  • Blank (" ")

    query and anchor are arbitrary character strings beginning with a question mark ("?") or a number/hash sign ("#").

    For URLs, the system only checks if the format is correct, but not if the target item exists.

time

Time in various country-specific formats, such as HH:MM:SS.

date

Date in various country-specific formats, such as:

DD.MM.YYYY

DD.MM.YY

YYYY-MM-DD

image

URL (see data type url) or RID (see data type rid).

Example: /documents/Images/logo.gif

The use of the data type image is obligatory when you specify the path to an image file in a KM repository. Otherwise, the system cannot display the image in question correctly in Show forms.

sequence

Structure node

If an element has this data type, you can create subnodes. You cannot reference structure nodes in a control.

user

User ID that exists in the user management of SAP Enterprise Portal.

integer

Integer

string

Any character string

rid

Complete path and ID of an item in a KM repository.

Example: /documents/Public Documents/MyDocument.doc

boolean

true or false

More Information

Validating User Input