ENABLEFIELDSUBSTITUTION
Function
Field data from forms sent to Batch Admin replace '#' field identifiers found in the body of the message. This option is disabled by default but can be enabled by using the EnableFieldSubstitution command. Subsequent lines will be preprocessed replacing '#' field identifiers with the data found in the identified field.
After enabling the preprocessing, if a '#' is required as part of a string it must be preceded by a '\'.
When executing a script from the Application Developer rule, the command can also access the session data. For example, the script can contain the special ID's for User ID, Client ID, or primary OU.
Syntax
ENABLEFIELDSUBSTITUTION
#fieldID
#{fieldID}
Parameters
fieldID |
Must be numeric. |
{fieldID} |
Allows you to immediately follow the field ID with a digit. |
Session data IDs
These IDs are only available when used in conjunction with the Run Batch Admin action on the Application rule.
#7001 User's first name
#7002 User's initials
#7003 User's last name
#7006 User's Client ID
#7012 User ID
#7100 User's full formatted name
#7101 Date of copy
#7102 Time of copy
#7103 Selected item
#5004 User's primary OU
Example
In order the take full advantage of field substitution you will need to create custom forms. For example, you want to allow employees to create unpublished conferences within Employee Lounge, but you don't want employees setting permissions. You also want the conferences to look great and have a specific icon.
You first create a container group named Employee Conferences and set the View/Resources field to Default Template View. Configure the group's model view. Set the permissions, including Do not publish in Directory. By using a container group, you can easily update member conferences.
Using FirstClass Designer you create a simple form that enables the user to name the new conference. The name of the conference is entered into field ID 4001. The form also has a field 30002, which is gets its content from the information entered into the With text field of the Application Developer rule.
The settings file is uploaded to the Employee Conferences container group's resources folder so user's will get the form the next time they open the Employee Lounge conference.
Create a unprotected conference named "Employee Template" and make it a member of the Employee Conferences container group. You can add subcontainers and documents, and links to other containers to the sample conference.
Users will run the script by selecting a manual rule on the Employee Lounge toolbar. The Employee Lounge permission has Use view from server enabled and employees have the Create Conference permission.
The rule looks like this:
The script is in a document named Employee Conference, and it is located in a folder named My Scripts on the admin Desktop. The document contains the following scripts:
ENABLEFIELDSUBSTITUTION
//make a copy of the template in the Employee lounge area, group membership will be copied.
COPY "General Conferences:Employee Template" "General Conferences:Employee Lounge" +nr
//Use the contents of the Get Confirmation form for the new conference name.
rename "General Conferences:Employee Lounge:Employee Template" "#4001"
//protect the new conference
PUT PROPERTIES "General Conferences:Employee Lounge:#4001" 1016 6 1
//Add the user's fully formatted name and creation date to the conference's About form. The message body field ID is 6
PUT ABOUTPATH "General Conferences:Employee Lounge:#4001" 6 "This conference was created by #7100 on #7101"
|