IABACAttribute.UIEditorBinding

Syntax

UIEditorBinding: String;

Description

The UIEditorBinding property determines a date and time format in attribute value.

Comments

Use the property if the conditions are satisfied:

The value of the UIEditorBinding property contains date and time format:

Example

To execute the example, add links to the ABAC, Metabase, and Dal system assemblies.

Sub UserProc;
Var
    ABACAttribute: IABACAttribute;
    ABACAttributes: IABACAttributes;
    MB: IMetabase;
    MS: IMetabaseSecurity;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    // Get license to be able to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    // Add a time attribute for users
    ABACAttributes := MS.Users.Attributes;
    ABACAttribute := ABACAttributes.Add;
    ABACAttribute.Name(MB.CurrentLocale) := "Time attribute";
    ABACAttribute.Id := "ATTR_TIME";
    ABACAttribute.DataType := DbDataType.DateTime;
    ABACAttribute.DefaultValue := Datetime.Parse("22.10.2018 20:00:00"); 
    ABACAttribute.UIEditorBinding := "DateTimePicker";
    // Apply changes in security manager
    MS.Apply;
    // Check in license
    Lic := Null;
End Sub UserProc;

After executing the example the time attribute is added in the security manager with the value in the format <DD.MM.YYYY HH:MM>.

See also:

IABACAttribute