Defining Application Extended Attributes

AdminStudio 2020 R2 SP1 | 20.01 | Application Manager

For each extended attribute that you define, you have to edit the following line of code to replace the placeholder text with a value for each of the columns that were defined in the previous line of code:

('Name','DisplayText','HelpText','Text','Values','DefaultFileExtension','FileFilter',
'DefaultValue',0,NULL)

Important:Do not delete any of the quote marks or commas from this line of code. If you do not want to define a value for a column, enter NULL or just leave a space between the quote marks.

The following table describes the possible values for each column:

ASCMExtendedAttribute Table Columns

Column

Possible Values

[Name]

Replace the default value of Name with a unique name to identify this Extended Attribute in the table.

Note:Do not use spaces or special characters. Make sure that it is a unique name.

[DisplayText]

Replace the default value of DisplayText with the name of this extended attribute. This value will be displayed in the Attribute column on the Extended Attributes tab of the Application View.

[HelpText]

Replace the default value of HelpText with text to describe the purpose of this extended attribute or any other information the end user will need to know when specifying a value for this attribute on the Extended Attributes tab.

This text will be displayed at the bottom of the Extended Attributes tab when this attribute is selected. Therefore, do not leave the default value of HelpText. If you do not want to display any help text, enter NULL or leave this value empty.

[Type]

Replace the default value of Type with one of the following values:

Text—Enter this value to define a text field.
Selection—Enter this value to define a drop-down list. When defining a drop-down list, you will also need to define the values of the drop down list using the [Values] column.
File—Enter this value to prompt the end user to browse for a file. When defining file selection field, you will also need to define the default file extension, using the [DefaultFileExtension] column, and the available file filters, using the [FileFilter] column.

[Values]

If [Type] is set to Selection, use this column to define the selections in the drop-down list. Separate the values using a semicolon (;), such as:

Illinois;Michigan;Wisconsin

[DefaultFileExtension]

If [Type] is set to File, replace the default value of DefaultFileExtension with the extension that you want to be selected, by default, in the file type drop down list.

For example, if you wanted *.doc to be the default file type, enter the following:

'*.doc'

[FileFilter]

If [Type] is set to File, replace the default value of FileFilter with code to identify the valid file types for this field.

You need to enter both the name of the file type—such as Word Documents (*.doc)—as well as the actual file type, such as *.doc. You separate these two values by a pipe | character, such as:

Word Documents (*.doc)|*.doc

You can specify two file types for the same entry by separating them by a semi-colon, such as:

Word Documents (*.doc)|*.doc;*.docx

To specify multiple entries, separate them by a pipe | character, such as:

Word Documents (*.doc)|*.doc;*.docx|
HTML Documents (*.html)|*.html;*.htm|
Text Documents (*.txt)|*.txt

In other words, enter these values in the following sequence:

Name_A|Extension1;Extension2|Name_B|Extension|Name_C|Extension

[DefaultValue]

Enter one of the following, depending upon the value specified for [Type]:

Text—If [Type] is set to Text, replace the default value of DefaultValue with text that you want to pre-populate this field.
Selection—If [Type] is set to Selection, replace the default value of DefaultValue with one of the values defined in the [Values] column to identify a default value. For example, if the [Values] column is set to Illinois;Michigan;Wisconsin, and if you want Michigan to be selected as the default selection in the drop-down list, then set the value of the [DefaultValue] column to Michigan.
File—If [Type] is set to File, replace the default value of DefaultValue with any file path. Make sure that the file type in this path matches one of the file filters listed in the [FileFilter] column definition.

If you do not want to enter a default value, set [DefaultValue] to NULL or just leave a space.

[OptimisticLockField]

Always set this value set to 0.

[GCRecord]

Always set this to NULL; if you do not, this record will be treated as deleted.

Sample Script and Extended Attributes Tab

If your ApplicationExtendedAttributes.SQL script included the following code:

insert into ASCMExtendedAttribute

([Name],[DisplayText],[HelpText],[Type],[Values],[DefaultFileExtension],[FileFilter],
    [DefaultValue],[OptimisticLockField],[GCRecord]) values

('Packager','Packager','Enter the name of the person who repackaged this application',
    'Text',' ',' ',' ',' ',0,NULL)

 

insert into ASCMExtendedAttribute

([Name],[DisplayText],[HelpText],[Type],[Values],[DefaultFileExtension],[FileFilter],
    [DefaultValue],[OptimisticLockField],[GCRecord]) values

('InstallerType','Installer Type','Specify whether this is a compressed or uncompressed setup',
    'Selection','Compressed;Uncompressed',' ',' ','Uncompressed',0,NULL)

 

insert into ASCMExtendedAttribute

([Name],[DisplayText],[HelpText],[Type],[Values],[DefaultFileExtension],[FileFilter],
    [DefaultValue],[OptimisticLockField],[GCRecord]) values

('RequiresReboot','Requires Reboot?','Specify whether this application requires reboot after
    installation','Selection','Yes;No;Unknown',' ',' ',' ',0,NULL)

 

insert into ASCMExtendedAttribute

([Name],[DisplayText],[HelpText],[Type],[Values],[DefaultFileExtension],[FileFilter],
    [DefaultValue],[OptimisticLockField],[GCRecord]) values

('TestResults','Test Results','Upload file containing QA test results','File',' ','*.doc',
    'Word Documents (*.doc)|*.doc|HTML Documents (*.html)|*.html;*.htm|
    Text Documents (*.txt)|*.txt',' ',0,NULL)

 

GO

... after it was run on an Application Catalog, the Extended Attributes tab of the Application View would list the following extended attributes:

Extended Attributes Tab of the Application View