Commands by name
ACTIVATE
Activates specific system features. Used to activate the System Administration Calendar so a server restart is not necessary or activate secure passwords.
Syntax
ACTIVE SYSCALENDAR
Syntax
ACTIVATE SECUREPASSWORDS +FINAL
Warning
This process is irreversible and permanently disables cleartext password retrieval.
ADD NETWORK/ADD TELECOM
Adds a regular (network) user or remote (telecom) user.
Syntax
ADD class userID first i last dept pw postaddr phone1 phone2 UG# UG1...UGn
Parameters
class Network creates a regular user. Telecom creates a remote user.
userID The user ID.
first Optional, unless i is also used. The first name.
i Optional. The initials.
last The last name.
dept Not used; always include a pair of quotation marks in the script.
pw The user's password.
postaddr Optional. The postal address. Use \r to enter a carriage return.
phone1 Optional. The phone number.
phone2 Optional. The fax number.
UG# The number of user groups to follow.
UG1...UGn The user groups to which the user will belong.
Example
To add a regular user Susan A. Bram, with user ID “SBRAM” and password “broccoli”, and to put her into the Employees and East Coast user groups, you would enter:
ADD NETWORK SBRAM Susan A Bram "" broccoli "123 Main St.\rToronto" "" "" 2 Employee "East Coast"
To add remote user Susan A. Bram, with user ID “SBRAM” and password “broccoli”, and to put her into the Employees and East Coast user groups, you would enter:
ADD TELECOM sbram Susan A Bram "" broccoli "123 Main St.\rToronto" "" "" 2 Employee "East Coast"
The \r puts a carriage return in the "Address" field.
Notes
• If you use the ADD command, and make a mistake in any of the parameters after the <dept> parameter (for example, if you spell the user group name incorrectly), FirstClass still adds an account for that user. To correct this, either delete the account, unsend the message, correct the error, and resend, or correct the information on the user information form.
• If you want a user to be prompted to change his or her password the first time the user logs in, create a password that does not meet the criteria set by the password security.
• One of the most common errors is to exclude the number of user groups (UG#) in the script. The server console will show the phrase "Type a number between 0 and 255" if you fail to include the number of user groups. Another common error is failing to put the names of groups that contain a space in quotation marks. If you mistype the name of a user group, the server console will indicate that the group does not exist, and list error 1081.
• If the user ID already exists, the server console will indicate error 1031.
• If the exact name already exists the server console will indicate error 1080. An example of an exact name would be creating a second Susan A. Bram, with a user ID of susan.
• If there are no Regular licenses available, the server console will indicate error 1018.
Related commands
Use the PUT USER command to create additional scripts that would add information unsupported by the ADD command. For example, the following script would add a mail alias (field ID 1252), a voice DN (field ID 1255), and a voice password (field ID 1256) for Susan Bram:
PUT USER sbram 1252 0 sabram 1255 0 9055551212 1256 0 1212
ADD REMOTE
Adds a remote name.
Note
The term 'remote name' refers to the Directory entry for a user on another server. To add a remote user, use ADD NETWORK/ADD TELECOM.
Before you can add a remote name, the site where the user is registered must be defined as a route or gateway.
Syntax
ADD REMOTE first i last dept sitename remoteclientID gateway
Parameters
first Optional, unless i is also used. The first name.
i Optional. The initials.
last The last name.
dept Not used.
sitename The name of the site where the user is registered.
remoteclientID The unique ID for the user. Use this field to distinguish between users with identical names.
gateway The gateway through which to route mail for this user.
Example
To add remote user Allen Smith, who is registered on the Husky Planes Los Angeles server, and whose mail is routed through Husky Planes Boston, you would enter:
ADD REMOTE Allen "" Smith "" "Husky Planes Los Angeles" 1234 "Husky Planes Boston"
ADD ROUTE
Adds a route to a remote server.
Syntax
ADD ROUTE name siteID cost gateway
Parameters
name The site name of the remote server.
siteID The serial number of the remote server.
cost The cost (typically 50 per hop).
gateway The gateway to which messages for this server will be delivered.
Example
To define a route for Husky Planes Los Angeles, whose messages are routed through Husky Planes Boston, you would enter:
ADD ROUTE "Husky Planes Los Angeles" 1001030 50 "Husky Planes Boston"
ADD TELECOM
AN
Adds a remote name to your server.
This command is used only by the Directory synchronization process. If you are a developer and require more information, see the FirstClass Gateway Toolkit Developer's Manual.
AUDIT
Performs an audit one a single user or container.
AUDIT OPTIONS enables the administrator to include or exclude read only items from the audit reports. Single audits always include read only items.
The List Directory also enables you to audit a single user or container. The AUDIT command can be used against containers which are not listed in the Directory.
Items deleted since the last audit will be permanently deleted. If necessary, items can be undeleted before submitting the AUDIT command. Expired items will be tagged for deletion on the next audit. Set the container's expiry date to Never, if necessary.
An audit will only be run on the specified container, not on any subcontainers.
Before the AUDIT command is submitted ensure the container is closed. The server console will indicate if the container is opened. Collaborate > Approve will prevent users from opening a container.
Syntax
AUDIT path
AUDIT CID cidnumber +p
AUDIT DELAY +p
AUDIT OPTIONS +r -r
Parameters
path A container specified by a path relative to the administrator’s Desktop.
DESKTOP userID The location of the form relative to the user’s Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
CID The client ID, found in List Directory & the User Info form.
+p Required only when auditing a user account or delaying audit.
+r Report Read Only diagnostics. Future audit reports will include the read only items
-r Suppress Read Only diagnostics. Future audit reports will not include the read only items, this is the default behavior.
Examples
To perform an audit on the Staff Lounge conference within General Conferences, enter
AUDIT "general conferences:staff lounge"
To perform an audit on the Mailbox of the user ID sbram, enter:
AUDIT desktop sbram mailbox
To include read only items in your audit summary, enter:
AUDIT OPTIONS +r
All future audit reports will include read only times, to set all future audits to exclude, read only items, enter:
AUDIT OPTIONS +r
The server may return a message indicating that an item needs to be manually linked to the container, contact Customer Support for additional instructions.
Susan's Client ID is 1692, to preform an Audit, enter:
AUDIT CID 1692 +p
If you are restoring your system from a backup you may want to delay the audit so the server does not start an audit at start up. To do this create a txt file with an extension of .ba, enter:
AUDIT DELAY +P
COMPILE
The COMPILE command is used to compile rules, resouces or custom columns in either a container or a container group.
Syntax
COMPILE path
COMPILE DESKTOP USERID path
COMPILE MODEL groupname ""
Parameters
Path A container specified by a path relative to the administrator’s Desktop.
DESKTOP USERID Path A container specified by a path relative to the user's Desktop.
MODEL groupname "" A user group or container group. Empty quotation marks always follow the group name.
Examples
To compile a container's rules and resources folder, enter:
NEW "General Conferences:employee lounge" "Receive Rule" "" FORMDOC 7027 -1 -1 21 +x
COMPILE "General Conferences:employee lounge"
To compile a a user's mailbox , enter:
NEW desktop sbram mailbox "Receive Rule" "" FORMDOC 7027 -1 -1 21 +x
COMPILE DESKTOP SBRAM "mailbox"
To compile a group resources folder:
NEW MODEL "EMPLOYEES" "" "Receive Rule" "" FORMDOC 7027 -1 -1 21 +x
COMPILE MODEL "EMPLOYEES"
COPY
The COPY command is the scripting equivalent to the COPY action available in the Application Developer rule. The COPY command works with variables to enable the administrator to create objects with different names while maintaining the structure, leaf items, aliases, permissions, rules and group membership. The COPY command will copy leaf items, containers, and aliased containers. Permissions, rules, and group membership are also duplicated.
All subscription lists will be empty.
Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Important
If the COPY command is used against conferences or calendars without variables, the resulting containers must be renamed before they will function normally.
Note
Syntax
COPY targetpath newpath +nr -c
Parameters
targetpath The location of the existing object, relative to the administrator’s Desktop.
newpath The path of new location, relative to the administrator’s Desktop.
+r Recursive, copies subconferences and subfolders.
+n Includes target path container.
-c Exclude content.
{} Allows you to immediately follow the Field ID with a digit.
Examples
To copy the leaf items of a folder to another folder, enter:
COPY "General Conferences:HR Staff:Current Policies" "General Conferences:HR Staff:Policy Revisions for 2009"
The target folder, Policy Revisions for 2009, must exist before the command is sent.
To copy a folder with all its contents including leaf and subcontainers, enter
COPY "General Conferences:HR Staff:Current Policies" "General Conferences:Management" +rn
Related commands
CHARSET
The CHARSET command to set the character set of the FirstClass script. Not supplying a number will result in the script being treated as the native character set. This command is useful for Application Developer installation scripts.
Syntax
CHARSET CharSetNumber
Parameters
CharSetNumber The number that represents a desired CharSet.
Legacy 0
UTF8 65001
Windows Latin 1252
Macintosh Roman 10000
Windows Cyrillic 1251
Macintosh Cyrillic 10007
Windows Central European 1250
Macintosh East European 10029
Japanese (Shift-JIS) 932
Chinese (GB 3212 8-bit) 93
Korean (KS C 5601 8-bit) 949
Examples
To set the character set to UTF8, enter the following:
CHARSET 65001
UPDATE "Multi-Site Setup:FC Resource Registry:English Resources" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:English Resources" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Deutsche Ressourcen" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Danske resourcer" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Recursos españoles" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Svenska resurser" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Ressource françaises" myforms.fc
UPDATE "Multi-Site Setup:FC Resource Registry:Suomenkieliset resurssit" myforms.fc
CHARSET
CHGALIAS
Changes the Internet alias for a user, conference, gateway, or route.
Note
This command replaces the contents of the "Mail Alias" field, it does not amend the field.
Syntax
CHGALIAS name alias
Parameters
name The name of the Directory entry. It can be a registered user, conference, gateway, or route. If a unique name is not provided, the first matching name is used.
alias One or more Internet aliases separated by commas. For gateways and routes, this is the domain name.
Examples
To change Susan A. Bram mail alias to sabram, you would enter:
CHGALIAS "susan a bram" sabram
To change the mail alias of the conference Employee Lounge to lounge, you would enter:
CHGALIAS "employee lounge" lounge
Related commands
The PUT USER command can also be used to change the mail alias (field ID 1252). The PUT USER command uses the User ID, which is always unique.
To change Susan A. Bram to sabram, you would enter:
PUT USER sbram 1252 0 sabram
COPYFLD
Copies the contents of a field from one form to another where source field ID and destination field ID are the same.
Syntax
COPYFLD source_objdesc fieldID dest objdesc
Parameters
source_objdesc The source where the form is located
path A form specified by a path relative to the administrator's Desktop.
DESKTOP userID The location of the form relative to the user’s Desktop.
SYSPROFILE The System Profile.
USER userID The user information form.
CLIENT clientID The user information form specified by the client ID.
DIRECTORY name The Directory form of gateways, conferences, remote names, and user groups.
fieldID The number assigned to the field in FirstClass Designer and listed in the Example.fc file.
dest_objdesc The destination form. Uses the same set of parameters as source_objdesc above.
Example
To copy the address field (1205) from sbram's information form to pchu's, you would enter:
COPYFLD user sbram 1205 user pchu
The user ID can be changed by the administrator, however, the client ID can never be changed, nor is the number ever reused. Systems administrated solely by FC scripting and external databases may prefer to use client ID.
To copy the address field (1205) from sbram's (client ID 1612) User Info formto pchu's (client ID 1602), you would enter:
COPYFLD CLIENT 1612 1205 CLIENT 1602
DEL
Deletes a user registered on your server.
Syntax
DEL userID
Parameters
userID The ID assigned to the user.
Example
To delete user Susan Bram, you would enter:
DEL sbram
If the user ID does not match exactly, the command will fail and the server console will indicate error 1003.
Related commands
DELALL
Deletes all routes or remote names from your Directory, or all the routes or remote names at a selected site. After using this command, you should resynchronize directories with the remote site to add all current remote names and routes.
Syntax
DELALL class siteID
Parameters
class REMOTE or ROUTE.
siteID The site ID, or zero for all sites. If you specify a site when deleting remote names, you delete all names originating from that site. If you specify a site when deleting routes, you delete all routes received from that site.
The Directory synchronization process uses the +t option. If you are a developer and require more information, see the FirstClass Gateway Toolkit Developer's Manual.
Example
To delete all remote names for users registered at Husky Planes Boston (site ID 1019026), you would enter:
DELALL REMOTE 1019026
DELFLD
Deletes field information on forms.
Syntax
DELFLD objdesc fieldID
When used to delete an address field:
DELFLD objdesc addressID index
Parameters
objdesc Describes the target.
fieldID The field ID
addressID "To" field is 4, "Cc" field is 5, "Bcc" field is 14. The "Who", "Access", and "Permissions" field on the Permission form is 29. Disregard the field IDs displayed in the FirstClass Designer for these fields.
index Position to insert in the list. Use 0 for the first name, 1 for the second name and so on. -1 for all entries.
address The name of the Directory entry. It can be a registered user, email address, conference, calendar, remote name, gateway, or route. If a unique name is not provided, the first matching name is used.
path A form specified by a path relative to the administrator’s Desktop.
DESKTOP userID path The location of the form relative to the user’s Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path
character.
PROFILE userID appID formID The application profile of a specific application, based on userID.
PROFILE clientID appID formID The application profile of a specific application, based on Client ID.
SYSPROFILE The System Profile.
USER userID The user information form.
DIRECTORY name The Directory form of gateways, conferences, remote names, and user groups.
PERMISSIONS path The Permission form of a conference or calendar.
Examples
To delete the sixth entry from a mail list, enter:
DELFLD path "Mail Lists:London" 4 5
The 4 in the command represents the "To" field. The 5 represents the sixth entry in the mail list.
To delete all entries in the mail list, enter:
DELFLD path "Mail Lists:London" 4 -1
To delete the Mail alias (field ID 1252), voice DN (field ID 1255), and Voice password (field ID 1256) from sbram's user information form, enter:
DELFLD user sbram 1252 1255 1256
To delete the first entry in the Employee Lounge conference's Permissions form, enter:
DELFLD permissions "General Conferences:employee lounge" 29 0
To all entries from the Employee Lounge conference's Permissions form, enter:
DELFLD permissions "General Conferences:employee lounge" 29 -1
To update the "Belongs to" field use the PGADD or PGDEL commands. Use REMOVE to remove an alias of the container from a user's Desktop.
DIAGNOSEDIR
Warning
The Directory entries are a key part of a user's account. Be sure to have a current backup before starting a Directory repair. We recommend you contact FirstClass Customer Support before beginning this process.
Performs Directory diagnostics on a live server. Replaces functionality previous performed by FirstClass Tools. A diagnosis of Directory items should be performed when there seems to be damage to user records, specifically if users or conferences can't be accessed through the Directory when you know they exist.
To isolate a Directory issue, you should begin by searching for the address in three different ways. Using Admin > List Directory, search by name, user ID, and CID. For Example, Susan Bram cannot log into the server even though her name appears in the Directory. To confirm a Directory issue, you would set the "Search" field to Name and search for Susan Bram. Then set the "Search" field to User ID, and search for sbram. Lastly, you would search for Susan's CID 1707. Only if one of the searches fail do you have a directory issue.
The Directory is made of three redundant databases. The DIAGNOSEDIR command is used to find a valid entry in one of the three databases. Once located, the valid entry is copied to the other two indices with REPAIRDIR.
The REPLY command is required. Within Administration > Admin Resources, you'll find a special form and script to aid in Directory Diagnosis and Repair.
Syntax
REPLY
DIAGNOSEDIR dirdesc pattern CID option
Parameters
dirdesc Index, Client, User, Gateway, Conference, Calendar, MailList, Remote, Group, or Route
pattern Optional; the string you want to search for.
CID Required when using the Client dirdesc. Optional when using any other dirdesc.
+n Treats the specified pattern as a name and will search the Name index.
Examples
To isolate a Directory that has a valid entry for Susan Bram, submit the following commands.
REPLY
//Checks the UserID index
DIAGNOSEDIR USER sbram
//Checks the CID index
DIAGNOSEDIR CLIENT 1707
//Checks the Name index, the CID is included to ensure the correct user named Bram is examined, +n is required
DIAGNOSEDIR USER "bram" 1707 +n
The server would return the following:
Diagnostic report for parameters: USER sbram
[1] (1707) "sbram" Susan Bram
SUMMARY:
1 entries were diagnosed.
0 problems found.
If one of the three parameters reports a problem, it is fixed with REPAIRDIR command.
If advised to do so by FirstClass Customer Support, you can run diagnostics for an entire index.
To diagnose the Name index, enter:
REPLY
DIAGNOSEDIR index name
To diagnose the Client ID index, enter:
REPLY
DIAGNOSEDIR index cid
To diagnose the Name index, enter:
REPLY
DIAGNOSEDIR index userid
REPAIRDIR
The Directory entries a key part of a user's account. Be sure to have a current backup before starting a Directory repair. We recommend you contact FirstClass Customer Support before beginning this process.
After the DIAGNOSEDIR command has located an index that is error free, the REPAIRDIR command is used to copy the entry to the other two indices.
The REPLY command is required. Within Administration > Admin Resources, you'll find a special form and script to aid in Directory Diagnosis and Repair.
The REPLY command is required.
Syntax
REPLY
REPAIRDIR dirdesc pattern ClientID option
Parameters
dirdesc Index, Client, User, Gateway, Conference, Calendar, MailList, Remote, Group, or Route
pattern Optional; the string you want to search for.
ClientID Required when using the Client dirdesc. Optional when using any other dirdesc.
+n Treats the specified pattern as a name and will search the Name index.
Examples
The Client index is error free, to duplicate the correct entry to the other two indices, send the following command.
REPLY
REPAIRDIR client 1707
The server returns:
Repair report for parameters: client 1707
Repaired:[1] (1707) "sbram" Susan Bram
The Name index is error free, to duplicate the correct entry to the other two indices, send the following command:
REPLY
REPAIRDIR USER Bram +n
The server returns:
Repair report for parameters: USER Bram +n
Repaired:[1] (1707) "sbram" susan bram
DIR
Returns a list of containers and leaf items. Also returns a summary of how many files and folders, the last modified dates, and the disk usage assigned to the container. The REPLY command is required. The index number is also returned for use with the BYINDEX keyword.
Syntax
DIR path +lbpsr
Parameters
path The location of the object, relative to the administrator’s Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
DESKTOP userID path The path is relative to the user's Desktop.
l Include leaf items.
b Include containers.
p Full path displayed.
s Include size (per item).
d Include date (per item)
r Include reference number (per item).
Example
To retrieve a summary of container, you would enter
REPLY
DIR "general conferences:employee lounge" +bl
The server would return:
Contents of: "general conferences:employee lounge"
[B:0] "Message Storage" ""
[B:1] "Away Today" "Faculty"
[B:2] "Employee Calendar" ""
[L:4] "Susan Bram" "Customer Update"
[L:5] "Susan Bram" "Fire Drill Procedures"
[L:6] "Susan Bram" "Welcome Paul Chu"
Summary:
Files: 3 Size: 64 kb Last file modified on: 2004/05/17 08:40:26
Folders: 3 Last folder modified on: 2002/06/11 13:41:45
The BYINDEX keyword can be used to work with any of the above items. For example, to protect the message "Welcome Paul Chu", you would send the following command.
PUT PROPERTIES BYINDEX 6 "General conferences:employee lounge" 1016 6 1
The BYINDEX number is only valid until a addition or deletion occurs. A new message posted to the conference would change all the index numbers.
To retrieve a list items on Susan Bram's Desktop, you would enter:
REPLY
DIR DESKTOP SUSAN "" +lpb
The server would return:
Contents of: DESKTOP sbram ""
[B:0] "MailBox" ""
[B:1] "Calendar" ""
[B:2] "Help" ""
[B:3] "My Web Site" ""
[B:4] "Contacts" ""
[B:5] "My Shared Documents" ""
[B:6] "My Documents" ""
[B:7] "School Area" "Model Desktop"
[B:8] "Student Area" "Model Desktop"
[B:9] "Susan Bram's Student Portfolio" ""
[B:10] "Employee Lounge" "Model Desktop"
Summary:
Files: 0 Size: 0 kb Last file modified on:
Folders: 11 Last folder modified on: 2004/05/12 20:08:36
DN
Deletes a remote name registered on your server
This command is used only by the Directory synchronization process.
ENABLEFIELDSUBSTITUTION
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
#Field ID
#{Field ID}
Parameters
Field ID Must be numeric.
{} 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 fieldID is 6
PUT ABOUTPATH "General Conferences:Employee Lounge:#4001" 6 "This conference was created by #7100 on #7101"
EXECUTE
This command is used to point to another FC script. The Application Developer rule includes a Run Batch Admin Script action which enables you to execute a script contained in a document. You can also use the IF command to run two different scripts based on the results of the IF command.
Syntax
EXECUTE script path +af
EXECUTE script attached +af
Parameters
Script path A FirstClass document located by path.
Script attached A txt file attached to the message.
+a Optional. Copy the attachments of the specified object.
+f Optional. Copy the forms data of the specified object
Examples
To excute a script named Create Conference located in a folder named My Scripts on the Admin Desktop, enter
EXECUTE script path desktop admin "My Scripts:Create Conference" +f
As an action within the Application Developer rule, the command would be:
EXECUTE script path desktop admin "My Scripts:Create Conference" +f
To execute a script contained in an uploaded txt file and its supported attachments, enter
EXECUTE script attached "myscript.txt" +a
ENROLL
Scripting equivalent of the Add Person function. Creates an application document for the user in folder defined as the Members List. If a Members List folder does not exist, one will be created and named Roster.
Syntax
ENROLL USER userid path
ENROLL CLIENT cid path
Parameters
USER userID The user specified by the user ID.
CLIENT cid The user spcificed by the client ID.
path An object specified by path, relative to the administrator’s Desktop.
Example
To add a user, whose user ID is sbram to the members list of an application container named Project Highland, located in FirstClass Applications > Projects
ENROLL USER sbram "FirstClass Applications:Projects:Project Highland"
To add a user, whose Clientr ID is 1752 to the members list of an application container named Project Highland, located in FirstClass Applications > Projects:
ENROLL CLIENT 1752 "FirstClass Applications:Projects:Project Highland"
EXIT
Stops the server from processing any further information. It can be used when submitting commands with a POP3 client.
Syntax
EXIT version
Parameters
version Optional. Server version number. processing is stopped if the server version is not equal or greater the version number.
Example
To stop processing a script if the server is not a 9.1 server, you would enter:
EXIT 9100
EXPORT
Generates a cross-platform FirstClass script based on existing objects on your server. Only the Admin account can submit EXPORT commands. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Subscription lists and group membership are not included in script returned by the server.
Syntax
• for generating a script
EXPORT path name +rnpe -cv
• for generating and executing a script
EXPORT path address BatchAdminPassword ObjDesc +b
Parameters
path Target path is relative to the administrator's Desktop.
Desktop userID path Target path is relative to the user's Desktop.
name Optional. The Directory name of the user or conference. The script is returned to the sender if the name parameter is not included.
address The name of the user that processes the batch admin command. Typically, within the same server, the parameter would be "batch admin".
ScriptPassword Optional. The password required to process scripting commands.
ObjDesc The target path.
+r Recursive, exports subconferences and subfolders.
+b Process script immediately. Used only with when generating and exporting objects in a single step.
+g Exports the contents of resources folder, the view properties of the model view and permissions of a container template group. Exports the contents of the resources folder and view properties of a user group.
+h Includes history records.
+n Includes target path container.
+p Includes the Who section of the permission form. All other supported fields on the permission form are included by default. Does not include subscription lists or group membership.
+e Includes container custom column forms, rules, and resources.
-c Excludes messages, documents, and files.
-v Excludes view properties.
-m Excludes last modified date. When the import script is run, object will be created with the current date.
To use the EXPORT command:
1 Send a message addressed to Batch Admin containing a valid EXPORT command.
FirstClass will extract the appropriate information and use it to generate an import script.
2 Create a forwarded copy of the message and address it to Batch Admin.
3 Replace <ObjDesc> with the destination path in the message body.
Conferences, calendars, gateways, groups, and mail lists require unique names.
Chats, folders, messages, conference items, documents, uploaded files, stationery, calendar tasks, and calendar events do not require unique names, and therefore no adjustments are necessary.
Note
The destination folder, conference, or calendar must exist. It can be created manually with the NEW command, or by including the +n option in the EXPORT command. If your server console reports "object not found" errors, the path may not exist or it may have been typed incorrectly.
4 Send the message.
EXPORT will not include:
• aliases of folders, conferences, or calendars (use LINK SPECIAL to recreate)
• The Who section of the permission form can be included with the script, however conference group membership and the list of subscribers are not included.
If you are sending the outgoing scripts through your Internet gateway, ensure that your outgoing line length is set to accomodate the line length of the script. This field is found on the Outbound tab of the Advanced Mail form within the Internet Services folder. If your server console reports object not found errors, you may not have your line length high enough.
Note
See SETEXPORTFILTERS for instructions on how to limit the import script based on last modified or thread ID. See SETEXPORTOPTIONS for instruction on how choose the attachment name.
Example list
[Link]Export rules
EXPORT examples
The Employee Lounge conference is located in the General Conferences folder. It contains messages, documents, uploaded files, a subconference, a folder, and a calendar.
To have the server return a script that would include (in addition to all the messages, documents, calendar items, and uploaded files) the conference, folder, and calendar contained in the Employee Lounge conference, and the view properties of the Employee Lounge conference, you would enter:
EXPORT "general conferences:Employee Lounge" +r
To generate and process the script in one step, you would enter:
EXPORT "general conferences:employee lounge" "batch admin" "" "general conferences:management area" +br
To have the server return a script that would include the Who section of permission forms (+p) of the subconferences and calendars, you would enter:
EXPORT "general conferences:Employee Lounge" +rp
The above script would not include the command to create a conference called Employee Lounge or any of the contents of the permission form of Employee Lounge.
To have the server return a script that would include the Who section of the permission forms of the subcontainers, but no content (-c) or view properties (-v), you would enter:
EXPORT "general conferences:Employee Lounge" +rp -cv
The script would not include the command to create an Employee Lounge conference or the permissions of Employee Lounge.
To have the server return a script that would include the Who section of the permission form (+p) of the Employee Lounge conference (+n), but not the subcontainers (the absence of +r), not the content (-c), and not the view properties (-v), you would enter:
EXPORT "general conferences:Employee Lounge" +pn -cv
To have the server return a script that would include the rules (+e) of the Employee Lounge conference (+n), but not the subcontainers (the absence of +r), not the content (-c), and not the view properties (-v), you would enter:
EXPORT "general conferences:Employee Lounge" +en -cv
To have the server return a script that would recreate an additional Employee Lounge conference (+n), the Who section of the permission forms (+p), the rules (+e), and all the recursive containers (+r). All the recursive containers' rules, content, permissions forms, and view properties would also be returned. Content and view properties are included by default.
EXPORT "general conferences:Employee Lounge" +nper
To have the server return a script that would recreate an additional Employee Lounge conference (+n), the Who section of the permission forms (+p), the rules (+e), and all the recursive containers (+r). The permissions and rules of the recursive containers would also be included. To exclude content (-c) and view properties (-v), you would enter:
EXPORT "general conferences:Employee Lounge" +nper -cv
To have the server return a script to create a container template including its model view and the contents of Student Conferences group, enter
EXPORT "groups:Student Conferences" +g
EXPORT DESKTOP examples
To export the contents of sbram's Contacts folder to pchu's Contacts folder, submit the following command:
EXPORT DESKTOP sbram "Contacts"
When the server returns the script, forward the message and replace <ObjDesc> with the following:
DESKTOP pchu "Contacts"
To export the contents of sbram's Contacts folder to pchu's Contacts folder in one step, submit the following command:
EXPORT DESKTOP sbram "Contacts" "batch admin" "" DESKTOP pchu "Contacts" +b
To export the Voice Menus folder from sbram's Voice Greetings folder to pchu's existing Voice Greetings > Voice Menus folder in one step, submit the following command:
EXPORT DESKTOP sbram "voice greetings:voice menus" "batch admin" "" DESKTOP pchu "voice greetings:voice menus" +b
Rules have limited support with FC Scripting, you are able to create and modify existing rules, but FC Scripting does not support the deletion of rules.
To export the mailbox rules from sbram's mailbox to pchu's mailbox, submit the following command,
EXPORT DESKTOP sbram "mailbox" +ne -cv
When the server returns the script, forward the message and make the following changes:
• change the <ObjDesc> to DESKTOP pchu
• comment out the commands that create the mailbox and set the permissions
• add command to create Conference Mail folder within Paul's Mailbox
//add a folder to mailbox
NEW DESKTOP pchu "mailbox" "Conference Mail" "" folder 26093 -1 -1
SetBase DESKTOP pchu
SetRelative FromBase Path ""
//New Relative "" "MailBox" "" Conference 23009 60 57 +P
//Put Permissions Relative "MailBox" 1012 7 0 1006 14 0 1004 14 0 2008 7 0 1000 6 0 1002 6 0 1001 6 0 1007 7 0 2009 7 6
SetBase FromBase Path "MailBox"
SetRelative FromBase Path ""
// Reference: 1:20134
New Relative "" "File in Folder" "" FormDoc 23047 112 15 23 23 -U+X
Put Previous 8120 7 1252 8140 0 8141 0 9 ""
Put Previous 13801.0 7 1 13810.0 7 11 13806.0 7 21 13821.0 7 2 13830.0 7 1 13832.0 0 "Conference Mail"
Put Properties Previous 13801 7 1
Put Properties Previous 13830 7 1
Put Properties Previous 1018 14 -1127673958
Compile Relative ""
SetRelative FromBase Path ""
EXPORT group examples
User groups and container templates groups consist of a group form, but they may also contain permissions, view properties and resources.
This command would simply return a script that would recreate a group form:
EXPORT "groups:employee"
For a user group, this command would return a script that would recreate a user group form and the view properties of the model desktop and the contents of the resources folder.
EXPORT "groups:employee" +g
For a container template group, this command return a script that would recreate a container template form and the permissions, the view properties of the model view and the contents of the resources folder.
EXPORT "groups:employee read conferences" +g
IF, ELSE, ENDIF
These commands add logic flow to FC scripting. For every IF command, a matching ENDIF command must be included, if this is not the case the script will not be executed. For every IF command, 0 or 1 ELSE command is expected, if this is not the case the script will not be executed.
There is little value in creating IF commands just to avoid warning messages. For example, if you want to remove a folder from users desktops, but aren't sure whether the folder exists. It is more effecient to write a script to remove the folder, even if it isn't there, than have FC scripting first check for its exsistence before deleting.
Or perhaps, you want to enable the unlisted feature on a number of User Info forms. Even if you suspect a few of the users already have unlisted enabled, it is far more efficient to simply enable the field for every user, than it is to first check the state of the checkbox. Your scripts will be much easier to write, and the server has to less work to do.
Syntax
IF Expression Test Expression
commands to execute if condition evaluates to true
ELSE
commands to execute if condition evaluates to false
ENDIF
Parameters
OBJECT path EXISTS Checks the existence of a specified object.
OBJECT path MISSING Determines the absence of a specified object.
FIELD FieldID EXISTS Field contains data on the form accompanying the script.
FIELD FieldID MISSING Field does not contains data on the form accompanying the script.
FORMFIELD path FieldID EXISTS Checks if a field on any other form contains data.
FORMFIELD path FieldID MISSING Checks if a field on any other form does not contain data.
FIELD FieldID test fieldvalue Checks the contents of the field on the form accompanying the script against the specified pattern.
FIELD FieldID test FIELD FieldID Compares the contents of two fields on the form accompanying the script.
FORMFIELD path FieldID test fieldvalue Checks the content of a field on any other form, defined by path.
test for numeric comparison, one of the following.
< less than
< less than or equal to
== equal to
=! not equal to
>= greater than or equal to
> greater then
path The location of the object, relative to the administrator’s Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
DESKTOP userID path An object on a user's Desktop. The path is relative to the user's Desktop.
fieldID The field ID.
fieldvalue The field value. May be enclosed in quotes if needed. The field value must be numeric for Checkbox, Popup and Number. Popup values can be found using FirstClass Designer.
OBJECT examples
Before writing a complex script, you may find it helpful to start by confirming the IF command returns the expected results.
The following script will return a message containing either True or False, depending on the existence of Employee Lounge conference within General Conferences.
REPLY
IF OBJECT "General Conferences:Employee Lounge" EXISTS
WRITE True
ELSE
WRITE False
ENDIF
This simple step will eliminate the IF command when debugging your script. In this example, if False is returned, look syntax or typing errors.
Within Employee Lounge there is a Contact Database, and you want create an alias of this in all the Contacts folders of your sales staff. You know that some Sales staff have already done this, but you want to make sure every team member has the Contact Database. In addition, the name of the Contact Database had changed from Customers to East Coast Customers. So there are two issues to solve, renaming existing alias and creating an alias if one doesn't exist.
//Check to see if a user has an alias to Customers in the Contacts folder
IF OBJECT desktop sbram "Contacts:Customers" EXISTS
// if the above statement is true then rename
rename desktop sbram "Contacts:Customers" "East Coast Customers"
ELSE
//if the above is false, create the alias.
LINK SPECIAL desktop sbram "Contacts" "General Conferences:Employee Lounge:East Coast Customers"
ENDIF
In this example, the result of the test will execute a script contained in document.
//Check to see if a user has an alias to Customers in the Contacts folder
IF OBJECT desktop sbram "Contacts:Customers" EXISTS
// if the above statement is true run this script
EXECUTE SCRIPT PATH desktop admin "scripts:TrueContacts"
ELSE
//if the above is false, run this script
EXECUTE SCRIPT PATH desktop admin "scripts:FalseContacts"
ENDIF
To repeat the commands based on a list of UserIDs see the REPEAT command.
FORMFIELD examples
Your custom form contains a checkbox, field ID 1000, and depending on its fieldvalue, two different scripts will run.
IF FORMFIELD "General Conferences:Employee Lounge:Event form" 1000 == 1
\\if value is equal to one execute the following commands
ELSE
\\if value is not equal to 1, then execute the following commands
ENDIF
Your custom form contains a checkbox, field ID 1000, and if fieldvalue is equal to 1, than a script is executed. If the value is not equal to 1 then you want the script to terminate.
IF FORMFIELD "General Conferences:Employee Lounge:Event form" 1000 == 1
\\if value is equal to one run execute the following commands
ELSE
\\if value is not equal to 1, then stop processing commands here
ENDSCRIPT
ENDIF
FIELD Examples
Users are presented with a form, that has an Editable Selection list, where Choose from list only is enabled. This has two choices: New Project; Copy Project. New Project is the default, therefore when the field is set to New Project, the field is missing because the server does not store default values of any form. The only time the field will have data, will be if Copy Project is choosen.
Any of the following commands can used.
IF FIELD 1000 EXISTS
\\The field has data, so run the script that copies a project.
EXECUTE SCRIPT path desktop admin "my scripts:copy project"
ELSE
\\The field has no data, so run the script that creates a project.
EXECUTE SCRIPT path desktop admin "my scripts:new project"
ENDIF
or
IF FIELD 1000 MISSING
\\The field has no data, so run the script that creates a project.
EXECUTE SCRIPT path desktop admin "my scripts:new project"
ELSE
\\The field has data, so run the script that copies a project.
EXECUTE SCRIPT path desktop admin "my scripts:copy project"
ENDIF
or
IF FIELD 1000 == Copy Project
\\The field is equal to Copy Project, run the script that copies a project.
EXECUTE SCRIPT path desktop admin "my scripts:copy project"
ELSE
\\Field ID is not equal to Copy Project, so run the script that createa a project.
EXECUTE SCRIPT path desktop admin "my scripts:new project"
ENDIF
Note
If the form did not contain a field 1000, than the IF command would consider it missing.
The same form also has a field (Field ID 1001) where the Project name is entered, and you want the IF command to terminate if the form is missing the Projectname. This script uses nested IF commands.
IF FIELD 1001 MISSING
REPLY
WRITE The script did not run because the Project name is missing.
ENDSCRIPT
ELSE
ENABLEFIELDSUBSTITUTION
NEW "general conferences:projects" "#1002" "" CONFERENCE 8 -1 -1 +p
\\this part of the script contains the commands that determine group membership
IF FIELD 1002 == "private project"
\\The field is equal to private project, so put the conference in the "Private Project" container group.
ELSE
\\Field ID is not equal to private project, so put the conference in the "All Sales Team" container group.
ENDIF
ENDIF
Your script compares the value of a field on the form accompanying the script, and a field on another form.
IF FIELD 1000 == FORMFIELD "general conferences:employee lounge:Event form" 1001
Related commands
GET
Extracts data from FirstClass objects at the field level. GET returns a single line of field triplets (fieldID, fieldtype, fieldvalue), one triplet per field ID requested, in a format that matches the PUT command fieldlist. The REPLY command must precede GET. For additional information, see the PUT command. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character. If objdesc is missing, PATH is assumed.
Syntax
REPLY
GET keyword fieldIDs +d +D +g
• when used to retrieve address fields:
REPLY
GET keyword addressID index
Parameters
ABOUT containername |
A conference or calendar résumé. |
ABOUTPATH containername |
A résumé of a conference or calendar that is not in the Directory. |
CLIENT clientID |
The user information form specified by the client ID. The Directory form of remote names and routes. |
DIRECTORY directorytype |
Directory form of conferences (ODInfo), folders (ODInfo), gateways (ODGateway) and user groups (ODInfo). Directory type keywords are conference, calendar, maillist, and group. |
path |
An object specified by path, relative to the administrator’s Desktop. |
DESKTOP userID path |
An object relative to the user's Desktop. Separate the components of the path with colons. |
PROFILE userID appID.formID |
The application profile of a specific application, based on userID. The application ID and application profile form are joined with a period. |
PROFILE clientID appID.formID |
The application profile of a specific application, based on Client ID. The application ID and application profile form are joined with a period. |
PREFERENCES userid |
A user’s Preferences form and Print Layout form. |
PROPERTIES path |
Used to retrieve information from the Get Info form for Mac OS or Properties form for Windows. The path is relative to the administrator's Desktop. |
PROPERTIES byindex indexnumber path |
Used to retrieve information from the Get Info form for Mac OS or Properties form for Windows. |
PROPERTIES byindex indexnumber DESKTOP userID path |
Used to retrieve field information from the Get Info form for Mac OS or Properties form for Windows. |
PROPERTIES byindex indexnumber path |
Used to retrieve information from the Get Info form for Mac OS or Properties form for Windows. The DIR command is used to retrieve the index number. The path is relative to the administrator's Desktop. |
PROPERTIES byindex indexnumber DESKTOP userID path |
Used to retrieve field information from the Get Info form for Mac OS or Properties form for Windows.The DIR command is used to retrieve the index number. |
PERMISSIONS path |
The permission form on a conference, calendar, or contact database The path is relative to the administrator's Desktop. |
PERMISSIONS DESKSOP userID path |
The permission form on a conference, calendar, or contact database The path is relative to the user's Desktop. |
USER userID |
The user information form specified by the user ID. |
USERCONFIG userID |
A user’s Mail Import form. |
RESUME userid |
A user’s résumé. |
RULES path rulename |
A container's Rule folder. Path is relative to the administrator's Desktop. |
RULES DESKTOP userid path rulename |
A container's Rule folder. Path is relative to the user's Desktop. |
SYSPROFILE |
The System Profile. |
fieldIDs |
The field IDs of the fields to be retrieved. Field IDs can be obtained from the Example.fc file that installs with FirstClass Designer. |
addressID |
"To" field is 4, "Cc" field is 5, "Bcc" field is 14. The permission's form "Who" field is 29. Do not use the field IDs displayed in FirstClass Designer for these fields. |
index |
Position in the list. Use 0 for the first entry, 1 for the second name and so on. Use -1 to retrieve all address entries. |
+d +D |
Optional and case sensitive. +d will return the time as formatted in the client. +D will return the time formatted to the system default. These options can be used with the "Created" (field 1235) and the "Last logged in" (field 1230) fields on the user information form. |
Example List
The GET command can help you create PUT commands. For example, if you want to add a voice DN (field ID 1255) and voice password (field ID 1256) to all your users, you could use the GET command to help you create the PUT syntax:
1 Open Example.fc using FirstClass Designer.
2 Open the User Data form (form ID 125) and look up the field IDs of the two fields.
3 Fill in the voice DN and voice password of any user.
4 Send a GET command:
reply
GET USER sbram 1255 1256
The server will return the field ID, field type and field value:
1255 0 "9055551212" 1256 0 "1212"
5 Compose the PUT command by replacing the field value with appropriate data. To add a voice DN and voice password to Paul Chu's account:
PUT USER pchu 1255 0 "9055551213" 1256 0 "1213"
GET ABOUT example
Used with container's that are published in the Directory.To retrieve About form's title (field ID 1000) and the body (field ID 6), enter:
REPLY
GET ABOUT "General Conferences:Employee Lounge" 1000 6
A conference uses a form named Résumé (form ID 97).
GET ABOUTPATH example
Used with container's that are not published in the Directory. To retrieve the title (field ID 1000) and the body (field ID 6) from the About form of a conference or calendar whose name is not in the Directory, enter:
REPLY
GET ABOUTPATH "General Conferences:secret employee lounge" 1000 6
A conference uses a form named Résumé (form ID 97).
GET CLIENT examples
The user ID can be changed by the administrator, however, the client ID can never be changed, nor is the number ever reused.
Susan Bram's client ID is 1602. To get sbram's user ID (field ID 1201), first name (field ID 1202), middle initial (field ID 1203) and last name (field ID 1204) fields based on the client ID, enter:
REPLY
GET CLIENT 1602 1201 1202 1203 1204
The server returns the following information:
1201 0 "sbram" 1202 0 "Susan 1203 0 "A" 1204 0 "Bram"
The client ID can also be used to retreive information from the Directory forms including those supported by the DIRECTORY keyword. The CLIENT keyword allows you to retrieve information from the Directory form of remote names and routes.
To retrieve the mail alias field from a Remote name with the client ID of 1956, enter
REPLY
GET CLIENT 1956 1252
Note
The client ID displayed in remote user's Directory form is that of the remote site. Use the List Directory to obtain the correct client ID for your site.
To retrieve the primary domain name (field ID 1001) from the Basic Internet Setup form, enter:
REPLY
GET "internet services:basic internet setup" 1001
Susan Bram posts the majority of events to the Employee Calendar. Most commands work with an object's name but with this calendar, every event has the same name - Susan Bram. The PATHCHAR command can be used to work the subject or description, however this calendar has events with the same description, so the BYINDEX keyword can be used.
The following command is sent to retrieve the index number:
REPLY
DIR "general conferences:employee lounge:employee calendar" +pld
The server would return:
Contents of: "general conferences:employee lounge:employee calendar"
[L:2] "Susan Bram" "All Staff Fire Drill" 2004/05/17 09:06:48
[L:3] "Susan Bram" "Lunch & Learn" 2004/04/17 09:08:28
[L:4] "Susan Bram" "Fund Raising Meeting" 2004/05/17 09:09:24
[L:5] "Susan Bram" "Lunch & Learn" 2004/05/17 09:45:43
To work with the Lunch & Learn event from April, enter the following command:
REPLY
DIR BYINDEX 3 "general conferences:employee lounge:employee calendar" 1009
To work the info form for the same event, enter the following:
REPLY
DIR PROPERTIES BYINDEX 3 "general conferences:employee lounge:employee calendar" 1016
To work with a calendar on Susan Bram's desktop, the command would be:
REPLY
GET PROPERTIES byindex 3 desktop sbram "calendar" 1016
See the DIR command for more information.
GET DESKTOP example
To retrieve the body of Susan's Home Page within the My Web Site folder, enter:
REPLY
GET DESKTOP sbram "my web site:home page" 6
GET PROFILE example
You've created a local application with an ID of 4001. As part of creating your application you also created a custom form for the application profile. You assigned your application profile a form ID of 1001. To retrieve field ID 2001 from an application profile based on a userID, enter
REPLY
GET PROFILE USER sbram 4001.1001 2001
To retrieve field ID 2001 from an application profile based on a clientID (1706), enter
REPLY
GET PROFILE CLIENT 1706 4001.1001 2001
GET PERMISSIONS examples
To retrieve the first entry of the Who section of a contact database permission form:
REPLY
GET PERMISSIONS "General Conferences:Employee Lounge:Customer List" 29 0
To retrieve the all entries of the Who section of a contact database permission form:
REPLY
GET PERMISSIONS "General Conferences:Employee Lounge:Customer List" 29 -1
The above examples are applicable to conferences and calendars. The subscription list and the "Belongs to" field are not supported by the GET command.
The [Link]EXPORT command can be used to retrieve all available field from the permission form. To retrieve the contents of the permission, not including the "Belongs to" field and the subscription list, enter:
EXPORT "General Conferences:Employee Lounge:Customer List" +np
GET PREFERENCES example
To retrieve the Reply text (field ID 1106), from the Preferences form (127) enter:
REPLY
GET PREFERENCES sbram 1106
Notes
• Fields with a value of greater than 10000 cannot be retrieved.
• Default values are not stored. For example, if the user's reply preference is the default Automatic, the reply will be empty.
GET PROPERTIES example
To retrieve the icon ID (field ID 1304), name (field ID 1017), location (field ID 1020), creator (field ID 1043), and determine if the Employee Lounge conference is protected (field ID 1016), enter:
REPLY
GET PROPERTIES "General Conferences:employee lounge" 1304 1017 1020 1043 1016
Susan has created a conference called Presentations on her Desktop. To retrieve the icon ID (field ID 1304), name (field ID 1017), location (field ID 1020), creator (field ID 1043), and determine if the conference is protected (field ID 1016), enter:
REPLY
GET PROPERTIES DESKTOP sbram presentations 1304 1017 1020 1043 1016
For additional field IDs, see the Get Info form (form ID 111).
GET USER examples
To get user sbram's user ID (field ID 1201), first name (field ID 1202), middle initial (field ID 1203)and last name (field ID 1204) fields, enter:
REPLY
GET USER sbram 1201 1202 1203 1204
The server returns the following information:
1201 0 "sbram" 1202 0 "Susan 1203 0 "A" 1204 0 "Bram"
Asking for the user ID to be included in the reply message will identify to which user the information pertains. Asking for multiple fields in a single command is more efficient than submitting multiple commands.
Only the main admin account can retrieve data from the "Password" field (field ID 1217). To retrieve Susan's password, enter:
REPLY
GET USER sbram 1201 1217
To retrieve the password in the MD5 digest, enter:
REPLY
GET USER sbram 1201 1217 +m
The server returns the following information:
1217 0 "brocoli"
To retrieve the date and time Susan last logged in, enter:
REPLY
GET USER sbram 1201 1230 +d
If the server returns a date of January 1, 1904, the user has never logged into the server.
If you want to know which groups a user is a member of, you need to retrieve data from the "User groups" field. This field is a "To" field, therefore the field ID is 4 and no field type is required.
REPLY
GET USER sbram 4 -1
The server will return the following information:
4 0 "Regular Users"
4 1 "Employee"
4 2 "East Coast"
If you want to know the second group Susan is a member of, enter:
REPLY
GET USER sbram 4 1
For additional field IDs, see the User Info form (FormID 125) in example.fc.
GET USERCONFIG example
To retrieve the icon ID (field ID 2005), mail server (field ID 2000), user name (field ID 2001), password (field ID 2003), and email address (field ID 2004) from Susan Brams' Internet Mail Import form, enter:
REPLY
GET USERCONFIG sbram 2005 2000 2001 2002 2003
For additional field IDs, see Message Import Setup, form ID 68.
GET RESUME example
To retrieve Susan Bram résumé's "Personal email" (field ID 5) and the body (field ID 6), enter:
REPLY
GET RESUME sbram 6 5 -1
The -1 will retrieve all entries in "Personal email", instead just the first entry. For additional fields IDs, see the Résumé, form ID 105.
GET RULES example
To determine if the File in Folder Rule is enabled or disabled (field ID 13800) enter:
REPLY
GET RULES "General Conferences:employee lounge" "File in Folder Rule" 13800
If the server returns an empty quotation marks the field is enabled. Rules are enabled by default, so the value of 1 is not stored by the server.
GET SYSPROFILE example
To retrieve the contents of the "Create users and conferences on this volume" field (field ID 1224) server serial number (field ID 1217) and version number (field ID 1202) from the System Profile, enter:
REPLY
GET SYSPROFILE 1224 1217 1202
For additional field IDs, see the System Profile, form ID 122.
Related commands
To change fields, see the PUT command.
To create objects, see the NEW command.
To work with objects based on the index number, see the DIR command.
To generate a scripts that would all form data, see the EXPORT command.
GETADMIN
Finds the user ID of the the main administrator of a system. You may find this command useful if you use automated administration software to keep FirstClass synchronized with other server software. Use this command in conjunction with the REPLY command.
Syntax
REPLY
GETADMIN
HOLD
The ability to hold the server in a known (static) state, allowing for a snapshot of the store, until its release. Once the hold has been initiated, the server will not respond to most requests until the hold has been released manually or the allotted time (Default: 60 seconds) has expired.
Syntax
Hold OptionalHoldTime
OptionalHoldTime Total amount of time, in seconds, until the server will release the hold. If not specified the default is 60 seconds.
Example
To initiate a hold for 2 minutes, send the following command:
HOLD 120
Note
Once this command is submitted the server can only be released at the server console. No further messages can be created to release the hold until the time expires.
INTIATEAPPINSTALL
Registers FirstClass applications in the Application Configuration form and creates the application folder. If the application registration fails, the script terminates.
Syntax
INITIAEAPPINSTALL appid appname appvendor
Parameters
appid 1001-1999 Application licensed at user level
2000-2999 Application licensed at site level
4000-4999 Local application
appname Application name
appvendor Name of application vendor
Example
To register a local application named Projects, enter
INITIATEAPPINSTALL 4001 Projects "Local Application"
The command will create a folder named Projects within FirstClass Applications.
LICENSE
Used with FirstClass license files to upgrade your system without shutting down the FirstClass server. The license files can also be used with FirstClass Tools.
Syntax
LICENSE operation licensenumber
Parameters
operation ADD or REMOVE
licensenumber License number of the license file.
Examples
LICENSE ADD 123456789.KEY
LICENSE REMOVE 987654321.LIC
LINK PATH
Makes an alias of a container and places it in another conference or folder. This command cannot be used to create a link to an object of a user's Deskop, see LINK SPECIAL. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Syntax
LINK PATH newpath currentpath
Parameters
newpath The desired location of the new link, relative to the administrator’s Desktop.
currentpath The location of the existing object, relative to the administrator’s Desktop.
Example
To create an alias in the Management conference of the Existing Policies conference located in the General Conferences folder, you would enter:
LINK PATH "General Conferences:Management" "General Conferences:Existing Policies"
Related commands
LINK USER
Makes an alias of a container and places it on a user’s Desktop. The user’s name is added to the subscription section of the conference's Permissions form. LINK USER only supports the creation of an alias on the user's Desktop; see [Link]LINK SPECIAL to place the alias within a container.
Syntax
LINK USER userID currentpath
Parameters
userID The user ID of the user requiring the alias.
currentpath The location of the existing object, relative to the administrator’s Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Example
To make a link to a conference called Employee Lounge and to place the link on sbram’s Desktop, you would enter:
LINK USER sbram "General Conferences:Employee Lounge"
Related commands
LINK SPECIAL
Makes an alias to a container and places it in another container. Use this command to makes aliases within exsisting containers on a user's desktop. This command also includes the ability to protect the alias, set location and choose the icon.
The command can also be used to create a punch through calendar.
The PATHCHAR command can be used to change the default path character.
Syntax
LINK SPECIAL newpath currentpath +i iconID +l h v +p
LINK SPECIAL DESKTOP userID newpath DESKTOP userID currentpath +i iconID +l h v +p
Parameters
path The location of the new object, relative to the administrator’s Desktop. Separate the components of the path with colons.
DESKTOP userID path Creates an object on a user's Desktop. The path is relative to the user's Desktop.
newpath The desired location of the new alias.
currentpath The location of the existing object.
h The horizontal pixel position for the new object relative to the top left corner of the Desktop. To place the object automatically, do not use the +l option.
v The vertical pixel position for the new object relative to the top left corner of the administrator’s Desktop. To place the object automatically, do not use the +l option.
+i IconID Optional. Icon ID to use for the alias
+l h v Optional. Location, horizontal and vertical position of the new alias.
+p Optional. Makes the alias protected. To create an unprotected alias do not use the +p.
Examples
Paul Chu would like an alias of Susan's "Husky Planes Policy" folder placed within his "My Work" folder on his Desktop. Susan has the Husky Planes Policy folder located in a folder called "Working Area".
LINK SPECIAL DESKTOP pchu "My work" DESKTOP sbram "working area:husky planes policy" +i 23007 +l 50 50 +p
Note
The +i, +l and +p can be submitted in any order, and all are optional.
Susan (and all the Customers Service team) require an alias of the Customer Info contact database located with the Employee Lounge conference. The Employee Lounge Conference is located within the General Conference on the admin's Desktop. The alias will be placed in Susan's Contacts folder.
LINK SPECIAL DESKTOP sbram "contacts" "General conferences:employee lounge:customer info"
Susan Bram would to see the contents of the Employee Calendar when she opens her Calendar application.
LINK SPECIAL desktop sbram "calendar" "general conferences:employee calendar"
Related commands
LIST
Generates a list of users, remote names, conferences, calendars, mail lists, or groups. The list can be generated from the whole Directory or just within specified groups. The LIST command must be preceded by a REPLY command. Passwords are exported as blanks (""). To export a list of passwords, see the GET command.
Syntax
• for user accounts
LIST pattern number G1...Gn +uraxl
• for other Directory entries
LIST pattern number G1...Gn +cgoz
Parameters
pattern Optional; the string you want to search for.
number Optional; the number of groups to follow.
G1...Gn The names of the groups you want to search.
+u Exports all regular and remote users. The entries in the output file are in ADD NETWORK/ADD TELECOM command format, including all parameters up to dept.
+r Exports all remote names. The entries in the output file are in ADD REMOTE command format, excluding the "Gateway" parameter. (This field would not be meaningful on a remote system.)
+a Exports all regular users, remote users, and remote names. The entries in the output file are in ADD REMOTE command format, excluding the "Gateway" parameter. (This field would not be meaningful on a remote system.)
+x Includes extended information for users (the pw to PGn parameters). Valid only in conjunction with the +u parameter.
+l Returns a list of user IDs, first names, initials, and last names without the ADD command. Valid only in conjunction with the +u parameter.
+c Returns a list of conferences.
+g Returns a list of user groups, conference groups, and calendar groups.
+o Returns a list of resource calendars, location calendars, group calendars, and gateways.
+m Returns a list of mail lists.
+z Returns a list of all Directory entries.
Examples
To produce a list of all users and the extended information, you would enter:
Reply
LIST +ux
To produce a list of users within the Employee groups:
Reply
LIST "" 1 employee +ux
To produce a list of users with the a first or last name of Susan within the Regular users:
Reply
LIST "Su" 1 "regular users" +ux
To produce a list of conferences:
Reply
LIST +c
NEW
Creates a new object such as a conference, folder, contact database, calendar, group, gateway, monitor, rule, stationery, chat room, message, or document. The EXPORT command will automatically generate the scripts necessary to create new objects. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Syntax
• for creating a leaf item, such as form.
NEW path name subj objtype icon h v formID +p
• for creating a conference, message, document, unprotected folder, or uploaded file:
NEW path name subj objtype icon h v +p
• for creating a calendar or a typed object:
NEW path name subj objtype icon h v type +p
Parameters
path The location of the new object, relative to the administrator’s Desktop.
DESKTOP userID path Creates an object on a user's Desktop. The path is relative to the user's Desktop.
name The name of the new object.
subj The content of the "Subject" field.
objtype Type of object to be created.
CHAT Creates a public chat
CONFERENCE Creates a conference, calendar, group calendar, resources calendar, or location calendar. Unique names are required.
FOLDER Creates a folder, unique names are not required.
FCF Creates an uploaded file.
FORMDOC Creates a form.
PERMS Creates a stationery message.
TEMPS Creates a voice monitor, Internet monitor, or server monitor.
SYSINFO Creates a session monitor.
MESSAGE Creates a message.
DOCUMENT Creates a document.
icon The ID of the icon.
subtype Creates special containers.
Bookmarks 16
Contact Databases 7
Personal Calendar 21
Group Calendar 28
Resource Calendar 22
Location Calendar 23
Shared Documents 33
My Documents 32
Memos 26
Web Site 15
Offline Conferences 2
Voice Greetings 20
Application container 35
Members list 36
Blog container 50
Podcast container 51
Workspace 41
File Storage 40
h The horizontal pixel position for the new object relative to the top left corner of the administrator’s Desktop. To place the object automatically, enter -1.
v The vertical pixel position for the new object relative to the top left corner of the administrator’s Desktop. To place the object automatically, enter -1.
formID The ID of the form. Form IDs can be found in Example.fc. Example.fc is installed with the FirstClass Designer.
+a Optional. Creates an unapproved item.
+d Optional. Creates a read only item.
+h Optional. Conference or Calendar is not published in the Directory.
+l Optional. Creates the object in the upper pane.
-l Optional. Creates the object in the lower pane.
+p Optional. Protects the object.
+t Optional. Creates the object in the toolbar.
+x Creates new object in Rules & Resources folder.
Example list
[Link]Create a duplicate conference name
[Link]Create a Server Control form
[Link]Create a Server Monitor, Internet Monitor, Directory Services or Voice Monitor
CHAT example
To create a chat room, use the object type CHAT. The icon number is 150 and the form ID is 129. The object will be placed automatically. For example, to create a chat room file inside a conference, enter:
NEW "General Conferences:Employee Lounge" "Water Cooler" "" CHAT 150 -1 -1 129
CONFERENCE examples
Used to create conferences and calenders.
To create a new protected conference named Employee Lounge with the standard conference icon, in the General Conferences folder, enter:
NEW "General Conferences" "Employee Lounge" "" CONFERENCE 8 41 15 +p
The conference does not require a subject field, therefore the field has been left blank by including two quotation marks. The conference will be placed in 41 pixels from the left and 15 from the top of the window.
In containers with a split, by default containers are created in the upper pane or left pane. To create a conference in the lower or right pane, enter:
NEW "General Conferences" "Employee Lounge" "" CONFERENCE 8 41 15 +pl
A conference needs to be created on Susan Bram's Desktop, so the path is represented by a pair of quotation marks. To create a conference, you would enter:
NEW desktop sbram "" "Presentations" "" conference 8 41 65 +p
To create a new protected conference, whose name does not appear in the Directy, enter:
NEW "General Conferences" "Employee Lounge" "" CONFERENCE 8 41 15 +ph
PUT PERMISSIONS "General Conferences:Employee Lounge" 2007 6 1
These two commands will also enable you to create conferences with duplicate names as long as the conferences are not created in the same location.
If you want to unpublish an existing conference, enter:
PUT PERMISSIONS "General Conferences:Employee Lounge" 2007 6 1
Duplicate published conferences can be created with the NEW command, if the following conditions are met:
• The System Profile has the "Require unique names" field disabled.
• At SETOU command places the conference in user group where an Organizational Unit has been defined and the "Require unique names within this organizational unit" field is enabled.
• The container where the new conference is to be created does not contain a conference of the same name. For example, with in General Conferences the NEW command can not create a second Employee Lounge conference.To create a second Employee Lounge conference in General Conferences > Sweden's Conferences folder, and make the conference a member of the Sweden Staff user group, enter the following:
SETOU "Sweden Staff"
NEW "General Conferences:Sweden's Conferences" "Employee Lounge" "" Conference 8 -1 -1 +p
The conference keyword is also used to create calendars; however, the type parameter must be included. To create a protected group calendar (type 28) named Staff Events, without a subject, and with the standard icon 24011, in the General Conferences folder, enter:
NEW "General Conferences" "Staff Events" "" CONFERENCE 24011 41 15 28 +p
The type for a personal calendar is 21 and the icon ID is 24011.
The type for a resource calendar is 22 and the icon ID is 24013.
The type for a location calendar is 23 and the icon ID is 24014.
To create an unlisted system events calendar, enter the following commands:
New "FirstClass Services" "System Events Calendar" "" Conference 24011 408 58 28 +P
ACTIVATE SYSCALENDAR
//unlist System Events Calendar
PUT DIRECTORY calendar "System Events Calendar" 1227 6 1
Contact Databases also useS the conference keyword, and requires a subtype of 7. To create a Contact Database within Employee Lounge, enter the following:
New "General Conferences:Employee Lounge" "Customer List" "" Conference 23014 35 16 7 +p
FOLDER examples
For example, to create a new unprotected folder called Old Messages in the Employee Lounge conference, with the standard icon, enter:
NEW "General Conferences:Employee Lounge" "Old Messages" "" Folder 26093 41 15
In containers with a split, by default containers are created in the upper pane or left pane. To create a folder in the lower or right pane, enter:
NEW "General Conferences:Employee Lounge" "Old Messages" "" Folder 26093 41 15 +l
To create a new contact database that can be shared, enter the following command:
NEW desktop sbram "Contacts" "Friends and Family" "" conference 23014 41 15 7
To create a Contacts folder on a user's desktop, a typed folder is required. Use 7 for a Contacts folder.
NEW desktop sbram "" "Contacts" "" folder 23014 41 15 7
The previous command creates a folder and cannot be shared through the permissions form.
To create a My Shared Documents folder on a user's desktop, a typed folder is required. Use 33 for My Shared Documents.
NEW desktop sbram "" "My Shared Documents" "" folder 13304 81 303 33
To create a My Documents folder on a user's desktop, a typed folder is required. Use 32 for a My Documents.
NEW desktop sbram "" "My Documents" "" folder 13304 81 303 32
To create a My Web Site folder on a user's desktop, a typed folder is required. Use 15 for My Web Site.
NEW desktop sbram "" "My Web Site" "" folder 23018 55 245 15
FCF example
Both the NEW command and the UPLOAD command are required. You also need to attach the file to the message that contains the batch administration command. The form ID parameter is not required. For example, to upload the staff settings.fc file to Employee Lounge, enter the following:
NEW "General Conferences:employee lounge" "staff settings.fc" "" FCF 17044 -1 -1
UPLOAD "General Conferences:employee lounge:staff settings.fc" "staff settings.fc"
To upload a resource file to the Resources folder of a user group, enter:
NEW MODEL "Employees" "" "staff settings.fc" "" FCF 17044 -1 -1 +X
UPLOAD PREVIOUS "staff settings.fc"
COMPILE MODEL "Employees"
FORMDOC examples
To create a new user group called Executive Users, enter:
NEW "Groups" "Executive Users" "" formdoc 23003 -1 -1 124 +p
To create a read only, search form within the Employee Lounge, enter:
NEW "General Conferences:Employee Lounge:Useful Searches" "Find Unread Messages" "" FORMDOC 2001 -1 -1 8000 +d
To create a new personal address called "Paul" in an existing Contacts, enter:
NEW desktop sbram "Contacts" "Paul" "" formdoc 23004 -1 -1 105
The +x option creates the new rule in the container's rules folder. To create a new receive rule (form ID 21) for the Susan Bram's Mailbox with the standard icon (7027), enter:
NEW desktop sbram mailbox "Receive Rule" "" FORMDOC 7027 -1 -1 21 +x
To create a Server Tools form, enter:
NEW "core services" "Server Tools" "" formdoc 2005 250 260 18 +p
To create a service account for an Archive Service cluster, with a remote server serial number of 800000010, enter the following commands:
New "Gateways & Services" "Archive Services 1" "Cluster 1" FormDoc 23001 60 210 126 +p
put previous 1102 0 "800000010"
New desktop "800000010" "" "Archive Services" "" Folder 24073 0 0 57
New desktop "800000010" "Archive Services" "Archive Services Setup" "" Document 2005 0 0 36
Notes
• Archive Services service accounts must use a remote server serial number between 800000000 and 800000099. Use the client to enter the passwords, connection information and scheduling.
• To create a send rule, use form ID 22, to create an advanced rule use form ID 23, to create an application developer rule.
• To create a new receive rule for the Employee Lounge conference, enter:
NEW "General Conferences:employee lounge" "Receive Rule" "" FORMDOC 7027 -1 -1 21 +x
COMPILE "General Conferences:employee lounge"
• FC Scripting does not support the deletion of Rules.
• See the EXPORT command for more information about creating rules.
To create an Application Developer rule in the Employee Conferences container template group:
NEW MODEL "Employee Conferences" "" "Receive Rule" "" FORMDOC 7027 -1 -1 27 +x
COMPILE MODEL "Employee Conferences" ""
To create a new Server Control form (form ID 58), enter the following:
NEW "core services" "Server Control" "" FORMDOC 23007 -1 -1 58 +p
PERMS example
Creates stationery forms. The form must be available in the Admin > Add New Stationery menu. For example, to add a user-defined stationery, whose form ID is 1001, you would enter:
NEW "General Conferences:Employee Lounge" "Suggestions" "" PERMS 17044 -1 -1 1001 +p
To create a stationery item, from any available message or document, you would enter:
NEW "General Conferences:Employee Lounge" "Suggestions" "Submit your suggestions" MESSAGE 17044 -1 -1 1001 +pm
Include a subject in the above command or the stationery will appear with a blank name. Stationery created with the above command will include the unsent flag.
TEMPS examples
Creates monitor forms. These objects must be protected in order to function. To create these monitors, enter:
NEW "Core Services" "Server Monitor" "" Temps 23007 -1 -1 7900 +p
You also need to bind the monitor to a Service account number. The New Cluster and Site Script version 8.0 and above include this step.
NEW "Internet Services" "Internet Monitor" "" Temps 23007 244 19 8900 +p
PUT PREVIOUS 1302 0 1000000000
NEW "Voice Services" "Voice Services Monitor" "" Temps 23007 244 19 7901 +p
PUT PREVIOUS 1302 0 9000000000
SYSINFO examples
The icon number is 23007. These objects must be protected in order to function. To create a session monitor or task monitor, enter one of the following commands:
NEW "Core Services" "Session Monitor" "" SYSINFO 23007 120 21 0 +p
NEW "Core Services" "Tasks Monitor (All)" "" SYSINFO 23007 120 21 1 +p
NEW "Core Services" "Tasks Monitor (System)" "" SYSINFO 23007 120 21 2 +p
NEW "Core Services" "Tasks Monitor (Active)" "" SYSINFO 23007 120 21 3 +p
MESSAGE example
To create a message in Susan's Mailbox, enter:
NEW DESKTOP sbram "mailbox" "Susan A. Bram" "Away today" Message 23032 273 21 0
DOCUMENT example
To create a new personal web page document (form ID 900) for Susan, enter:
NEW DESKTOP sbram "My Web Site" "Home Page" "" Document 23019 30 15 900
In a container with a split, documents are created in the lower or right pane, if you want to create a document in the upper or left pane, enter:
NEW DESKTOP sbram "My Web Site" "Home Page" "" Document 23019 30 15 900 -l
In a container with a split, documents are created in the lower or right pane, if you want to create a document toolbar enter:
NEW DESKTOP sbram "My Web Site" "Home Page" "" Document 23019 30 15 900 +t
Related commands
To fill in field data on objects created with the NEW command see the PUT command and the EXPORT command.
MOVE
Moves a container or item to another location.
Syntax
MOVE CONTENTS source_objdesc target_objdesc -p
MOVE ITEM source_objdesc target_objdesc -p
Parameters
source_objdesc The source where the item is currently located
target_objdesc The new location.
-p Optional. Moves the source object even if it is protected.
Examples
After this command the Employee Lounge will no longer have a folder named Archived messages. To unprotect and move a folder named Archived Messages from Employee Lounge to Staff Area, enter
MOVE ITEM "General Conferences:Employee Lounge:Archived Messages" "General Conferences:Staff Area" -p
To leave the folder in Employee Lounge, but move the all messages within Archived Messages to a subfolder named Archived Messages 2005, enter
MOVE CONTENTS "General Conferences:Employee Lounge:Archived Messages" "General Conferences:Employee Lounge:Archived Messages:Archived Messages 2005" -p
To empty a container of all its contents, create a temporary folder, move the contents, then delete the temporary folder.
NEW "" "Temp" "" FOLDER 8 -1 -1
MOVE CONTENTS "General Conferences:Employee Lounge:Archived Messages" "Temp" -p
REMOVE "Temp"
PATHCHAR
Changes the default path separator command when specifying objects using a path name. By default this character is a colon (:) but it can be changed to another character (for example, /) to specify targets containing colons. The setting persists until the end of the current script.
Can also be used to add a subject field as part of the path. Any object can contain a name and subject path, however, you will need to specify the path separator.
Syntax
PATHCHAR char
Examples
Calendars often contain numerous events with either the same name or no name at all. In order to work with events you'll need to define a separator for the subject.
To set name separator as a colon and the subject (description) separator as a slash, enter:
PATHCHAR ":" "/"
To remove an item that has no name, but a subject of Company Meeting, enter:
PATHCHAR ":" "/"
REMOVE "calendar:/company meeting"
To remove an item from the Administrator, where the subject is Company Meeting, enter:
PATHCHAR ":" "/"
REMOVE "general conferences:employee lounge:employee calendar:administrator/company meeting"
Related commands
Also see the DIR command for an example on how to use the BYINDEX keyword.
PGADD
Adds a user, conference, mail list, or group calendar to one or more groups.
Syntax
• for users by user ID:
PGADD userID G1 ... Gn
• for users by client ID:
PGADD clientID G1 ... Gn +c
• for conferences, calendars, or mail lists by name
PGADD name G1 ... Gn
• for conferences, calendars, or mail lists by client ID
PGADD clientID G1 ... Gn +c
Parameters
userID The user ID of the user who you want to assign to the user group(s).
name The Directory name of the conference, mail list, or calendar.
G1 ... Gn The name(s) of the user group, conference group, or calendar group.
+c Required if using Client ID.
Examples
To add Sue Bram to the Employee and East Coast user groups, you would enter:
PGADD sbram Employee "East Coast"
Sue Bram's client ID is 1702, to add her to the Employee and East Coast user groups, you would enter:
PGADD 1702 Employee "East Coast" +c
User IDs can be changed, however Client IDs never change and are never reused. Systems that are exclusively managed through FirstClass scripting generally use the client ID.
The Employee Lounge conference client ID is 1567. To add it to the Employee Conferences group, you would enter:
PGADD 1572 "Employee Conferences" +c
To add Employee Lounge to the Employee Conferences group, you would enter:
PGADD "Employee Lounge" "Employee Conferences"
Related commands
To remove a user, conference, mail list, or group calendar from a group see PGDEL.
PGDEL
Deletes a user, conference, mail list, or calendar group from one or more groups.
Syntax
• for users:
PGDEL userID G1 ... Gn
• for conferences, calendars, or mail lists:
PGDEL name G1 ... Gn
Parameters
userID The user ID of the user who you want to remove from the user group(s).
name The Directory name of the conference, mail list, or calendar.
G1 ... Gn The name(s) of the user group, conference group, mail list, or calendar.
Examples
To remove sbram from the East Coast user group, you would enter:
PGDEL sbram "East Coast"
To remove Employee Lounge from the Employee Conferences group, you would enter:
PGDEL "Employee Lounge" "Employee Conferences"
Related commands
To add a user, conference, calendar, or mail list to a group see PGADD. To remove an unpublished conference from a group see DELFLD.
PUT
Updates FirstClass forms at the field level. The PUT command requires a field ID, fieldtype, and fieldvalue. The GET command can be used to generate the fieldtype and fieldvalue. The field IDs can be found in Example.fc.
Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character. If objdesc is missing, PATH is assumed.
When creating a new object with the NEW command, you can use the PREVIOUS keyword to enter field data.
Syntax
PUT objdesc fieldlist +a
• When used to insert data into fields which are populated with Directory names:
PUT objdesc addressID index address
Parameters
objdesc Available keywords.
ABOUT name A conference or calendar résumé. The name of the container appears in the Directory.
ABOUTPATH name A conference or calendar résumé. The name of the container is hidden from the Directory.
USER userID User information form specified by the userID
CLIENT clientID The user information form specified by the client ID. The Directory form of remote names and routes.
USERCONFIG userid The Mail Import form, available from the user info form.
path A leaf or container specified by the path, relative to the administrator’s Desktop.
path byindex indexnumber A leaf or container specified by the path and index number, relative to the administrator’s Desktop. The DIR command is used to retrieve the index
number.
DESKTOP byindex indexnumber userid path A leaf or container specified by the path and index number, relative to the user’s Desktop.
DIRECTORY directorytype Directory form of conferences (ODInfo), folders (ODInfo), gateways (ODGateway)and user groups (ODInfo). Directory type keywords are conference, calendar, maillist, and group.
ITEM path Field information in the item list of a container.
MODEL name The Desktop of the user group or container template model view.
PREVIOUS Optional following a NEW command. Replace the path with the keyword PREVIOUS.
PROFILE USER userid appid.formid The application profile based on user ID. The application ID and application profile form are joined with a period.
PROFILE CLIENT userid appid.formid The application profile based on client ID. The application ID and application profile form are joined with a period.
PROPERTIES path The Info form. The path is relative to the administrator's Desktop.
PROPERTIES desktop userid path The Info form. The path is relative to the user's Desktop.
PROPERTIES byindex indexnum path The Info form. The path is relative to the administrator's Desktop and based on the index number returned by the DIR command.
PROPERTIES byindex indexnum desktop userid path The Info form. The path is relative to the user's Desktop and based on the index number returned by the DIR command.
PROPERTIES MODEL name The Info form. The path is relative to the group's Desktop.
PREFERENCES userid A user’s Preferences form and Print Layout form.
RESUME userid A user’s résumé.
RULES path rulename A object within a container's rule folder. Path is relative to the admin's Desktop.
RULES DESKTOP userid path rulename A object within a container's rule folder. Path is relative to the user's Desktop.
SEARCH userid A user’s search form.
SYSPROFILE The System Profile.
fieldlist A list of field descriptor triplets of the form:
fieldID fieldtype fieldvalue
fieldID The field ID.
fieldtype The field type. Supports:
0=String; includes fields defined as text and editable lists.
6=CheckBox; includes fields defined as checkboxes or radio groups.
7=Popup; includes fields defined as static lists and icons.
14=Number, includes fields defined as numeric or date & time.
122=Image viewer fields.
fieldvalue The field value. May be enclosed in quotes if needed. The field value must be numeric for Checkbox, Popup and Number. Popup values can be found using FirstClass Designer.
+a Used to append the body of a message, or document, and some string fields.
addressID "To" field is 4, "Cc" field is 5, "Bcc" field is 14. Do not use the field ID displayed in FirstClass Designer for these fields.
index Position to insert in the list. Use 0 for the first entry, 1 for the second entry, and so on.
address The name of the Directory entry. It can be a registered user, email address, conference, gateway, service, or remote name. If a unique name is not provided, the first matching name is used.
Example list
PUT ABOUT example
To fill in the About Conference form (also known as a conference résumé) for the Employee Lounge conference, enter:
PUT ABOUT "employee lounge" 1000 0 "About the Employee Lounge" 6 "This conference is used to share ideas and knowledge."
PUT ABOUTPATH example
To fill in the About Conference form (also known as a conference résumé) for the unpublished Secret Employee Lounge conference, enter:
PUT ABOUTPATH "General Conferences:secrect employee lounge" 1000 0 "About the Secret Employee Lounge" 6 "This conference is used to share ideas and knowledge."
The About Conference form can be appended with the +a option.
PUT USER examples
The USER keyword changes the user info form.
To change a user’s first name (field ID 1202) from Susan to Sue and her password (field ID 1217) to carrot enter:
PUT USER sbram 1202 0 Sue 1217 0 carrot
To change Sue from a remote user to regular user, enter:
PUT USER sbram 1223 7 1
To change Sue from a regular user to a remote user, enter:
PUT USER sbram 1223 7 5
To add a mail alias (field ID 1252), Voice DN (field ID 1255), and Voice password (field ID 1256) for Susan, enter:
PUT USER sbram 1252 0 "sabram" 1255 0 9055551212 1256 0 1212
The user ID can be changed by the administrator, however, the client ID can never be changed, nor is the number ever reused. Systems administrated solely by FirstClass scripting and external databases may prefer to use client ID.
Susan Bram's client ID is 1602. To add a mail alias (field ID 1252), Voice DN (field ID 1255), and Voice password (field ID 1256) for client ID 1602, enter:
PUT CLIENT 1602 1252 0 "sabram" 1255 0 9055551212 1256 0 1212
The client ID can also be used to update information on the Directory forms including those supported by the DIRECTORY keyword. The CLIENT keyword allows you to update information on the Directory form of remote names and routes.
To add a mail alias to a Remote name with the client ID of 1956, enter
PUT CLIENT 1956 1252 0 "royallen"
Note
Choose Admin > List Directory to obtain the correct client ID.
PUT DIRECTORY example
To add a mail alias (field ID 1252) and Voice DN (field ID 1255) for the Employee Lounge conference, enter:
PUT DIRECTORY CONFERENCE "Employee Lounge" 1252 0 "lounge" 1255 0 9055551212
Note
Use PGADD and PGDEL to update group membership of a container in the Directory, and PUT PERMSSIONS to add an unpublished container to a group.
For addititional fields see the Example.fc file. The user info form is form ID 125, ODInfo is form ID 115.
PUT USERCONFIG example
The USERCONFIG object type updates the Mail Import form.
To add the icon ID (field ID 2005), mail server (field ID 2000), user name (field ID 2001), password (field ID 2002), email address (field ID 2003) to Susan's Internet Import form, enter:
PUT USERCONFIG sbram 2005 14 8 2000 0 huskyplanes.com 2001 0 suebram57 2002 0 f1504x2 2003 0 suebram57@huskyplanes.com
For additional field IDs, see Mail Import Setup (form ID 68) included with Example.fc.
Path examples
For example, the command can be used to change fields in user groups, gateway settings, contacts, and mail list forms. To change fields in the View Properties form see the SNAPSHOT command.
To fill in the primary domain name in the Basic Internet Setup from, enter:
PUT "internet services:basic internet setup" 1001 0 huskyplanes.com
To bind a Directory Monitor, Internet Monitor or Voice Monitor to a service account, enter:
PUT "Directory Services:Directory Monitor" 1302 0 "1000000000"
PUT "Internet Services:Internet Monitor" 1302 0 "4000000000"
PUT "Voice Services:Voice Monitor" 1302 0 "9000000000"
To take away Chat from the All Users group, enter:
PUT "Groups:All Users" 1206 6 0
To enter information in a text field on a custom form you have created enter:
PUT "General Conferences:Employee Lounge:Contact Info" 1001 0 "555-1212"
The field where you add names to a mail list field is a "To" field, so you would use the syntax for address fields. To enter the first two names in an existing mail list enter:
PUT "Mail Lists:Sales" 4 0 "David Smith"
If the NEW command is used to create the mail list, then the PUT command can use PREVIOUS keyword instead of the path.
New "Mail Lists" "Sales" "" FormDoc 23005 0 0 118
PUT PREVIOUS 4 0 "David Smith"
To add text into an existing document, you would use field ID 6. This field does not require a field type. You can only send 250 characters at once. If you wanted your document to appear in the following format:
FirstClass consists of two parts: a client application (you) and a server application.
To connect to a particular server:
• there must be a network or modem connection between your computer and the computer that is running the FirstClass server to which you want to connect
• you must have FirstClass installed on your computer.
You would submit the following commands. The +a appends the message body, and the \r enters a carriage return:
PUT "test:body" 6 "FirstClass consists of two parts: a client application (you) and a server application.\r \r"
PUT "test:body" 6 "To connect to a particular server:\r" +a
PUT "test:body" 6 "- there must be a network or modem connection between your computer and the computer that is running" +a
PUT "test:body" 6 "the FirstClass server to which you want to connect\r" +a
PUT "test:body" 6 "- you must have FirstClass installed on your computer." +a
BYINDEX example
Susan Bram posts the majority of events to the Employee Calendar. Most commands work with an object's name but with this calendar, every event has the same name - Susan Bram. The PATHCHAR command can be used to work the subject or description, however this calendar has events with the same description, so the BYINDEX keyword can be used.
The following command is sent to retrieve the index number:
reply
DIR "general conferences:employee lounge:employee calendar" +pld
The server would return:
Contents of: "general conferences:employee lounge:employee calendar"
[L:2] "Susan Bram" "All Staff Fire Drill" 2004/05/17 09:06:48
[L:3] "Susan Bram" "Lunch & Learn" 2004/04/17 09:08:28
[L:4] "Susan Bram" "Fund Raising Meeting" 2004/05/17 09:09:24
[L:5] "Susan Bram" "Lunch & Learn" 2004/05/17 09:45:43
To work with the Lunch & Learn event from April, enter the following command
PUT byindex 3 "general conferences:employee lounge:employee calendar" 1009 0 "Susan's Office"
To change the info form for the same event, enter the following:
PUT PROPERTIES byindex 3 "general conferences:employee lounge:employee calendar" 1016 6 1
To work with a calendar on Susan Bram's desktop, the command would be:
PUT PROPERTIES byindex 3 desktop sbram "calendar" 1016 6 1
See the DIR command for more information.
PUT DESKTOP userid examples
The DESKTOP keyword updates forms, such as contact entry, personal mail lists, documents, messages, and stationery forms, at the field level, relative to the user’s Desktop.
Sue Bram has a Presentations conference on her Desktop and you want to update a Phone Call form contained in the conference. To enter information in the "Of" field (field ID 1012) enter:
PUT DESKTOP sbram "Presentations:To Paul" 1012 0 "Springfield"
To fill in the "To" field on a stationery form, use the syntax for address fields. To insert the first addressee (paulchu@springfield.edu), enter:
To set Sue Bram's Desktop to use a picture called desktop.png (field ID 13083), enable the Use Background Picture field and disable the Tile background which are both controlled by field ID 13082:
PUT DESKTOP sbram "" 13082 7 112 13083 0 "desktop.png"
PUT ITEM example
In most cases, the text seen in the columns of a container a generated from either the properties form of the object or from field data of a form. For example, when you open your Contacts application you are presented with a variety of information from the contacts form such as the address. When you open your mailbox, you are presented with information from the properties form, such as the last modified date. All containers present information from both sources.
Export scripts will often include PUT ITEM commands. You can use this command to set the color of a punch through calendar.
The first step is to find the numeric value of the color. Using the client, set up your sample punch through calendar to display the desired color.
Use the EXPORT command to retreive the value of the color:
REPLY
GET ITEM "calendar:stat holidays" 1003
The server will return:
1003 14 157001216
Next create a link to the Stat Holidays calendar to a user's calendar, then set the color of the Stat Holidays calendar.
LINK SPECIAL desktop sbram "calendar" "general conferences:stat holidays"
PUT ITEM desktop sbram "calendar:stat holidays" 1003 14 157001216
PUT MODEL examples
The MODEL keyword enables you to work with model desktops and the resources folder of a user group and the model view and resources folder of container group.
Note
Scripting will not cause a model Desktop remodel. These examples are only useful for groups without any member users.
To create new objects on a new user group's model Desktop, the command would be:
New model "New Employees" "" "My Projects" FOLDER 21003 50 175 +p
To protect (1016) a folder named My Projects, then set the location (1306, 1307), and set model action to copy (8057), the command would be:
PUT PROPERTIES MODEL "New Employees" "My Projects" 1016 6 1 1306 14 50 1307 14 175 8057 7 2
PUT PROFILE examples
The PROFILE keyword changes the a user's application profile. You've created a local application with an ID of 4001. As part of creating your application you also created a custom form for the application profile. You assigned your application profile a form ID of 1001.
To enter how many days of vacation (2001) Susan has into Susan Brams' application profile, you would enter
PUT PROFILE USER sbram 4001.1001 2001 7 20
To perform that same task, but based on Susan's client id of 1706, you would enter.
PUT PROFILE CLIENT 1706 4001.1001 2001 7 20
PUT PROPERTIES examples
The PROPERTIES keyword changes the Info form. The path is relative to the administrator's Desktop.
To protect an existing conference, enter:
PUT PROPERTIES "General Conferences:Employee Lounge" 1016 6 1
To unprotect an existing conference, enter:
PUT PROPERTIES "General Conferences:Employee Lounge" 1016 6 0
To make the conference unapproved, enter:
PUT PROPERTIES "General Conferences:Customer Support" 1320 6 1
For example, to change the horizontal (field ID 1306) and vertical (field ID 1307) position of the Employee Lounge conference, enter:
PUT PROPERTIES "General Conferences:Employee Lounge" 1306 14 205 1307 14 5
To set the "Item AppID" (field ID 8066) and the "Item type" (field ID 8067) enter:
PUT PROPERTIES "General Conferences:Customer Support" 8066 7 4000 8067 7 1200
To set the container's subtype to a Application Container (field ID 1309) enter:
PUT PROPERTIES "General Conferences:Customer Support" 1309 7 35
To set the container's subtype to a Members List (field ID 1309) enter:
PUT PROPERTIES "General Conferences:Customer Support" 1309 7 36
To disable the read only attribute on a conference, enter:
PUT PROPERTIES "General Conferences:Customer Support" 1321 6 0
PUT PROPERTIES DESKTOP userid examples
The PROPERTIES DESKTOP userid object type changes the Info form. The path is relative to the user's Desktop.
To disable the protect and read only attributes for Sue Bram's Presentations conference, enter:
PUT PROPERTIES DESKTOP sbram "presentations" 1016 6 0 1321 6 0
PUT PREFERENCES example
The PREFERENCES keyword updates a user’s Preferences form. You can change any field with field IDs less then 10000.
To set sbram's Reply preference to Reply to Sender, enter:
PUT PREFERENCES sbram 1107 7 2
To set the first line of Sue Bram's signature (field ID 1109) to "Sue Bram", the second line to "Husky Planes" and enable the Automatically add signature to new message field (field ID 1108), enter:
PUT PREFERENCES sbram 1109 0 "Sue Bram\rHusky Planes" 1108 6 1
The \r enters a carriage return.
If your signature text is more than 250 characters use the +a options to add additional test, enter:
PUT PREFERENCES sbram 1109 0 "The views and opinions expressed in this email are strictly those of the author./r"
PUT PREFERENCES sbram 1109 0 "The contents of this email have not been reviewed or approved by Husky Planes" +a
To disable sbram's Print envelope (field ID 4508) on the Print Layout form (form ID 180), enter
PUT PREFERENCES sbram 4508 6 0
PUT RESUME example
The RESUME object type adds content to a user's Résumé form.
To add Susan Bram's name, enter:
PUT RESUME sbram 1006 0 "Susan" 1014 0 "Bram"
To add content to this résumé, enter:
PUT RESUME sbram 6 "My name is Susan Bram, and I have worked for Husky Planes for 5 years.\r\rMy normal hours are 0700 to 1500"
The \r inserts a carriage return.
To append content to this résumé, enter:
PUT RESUME sbram 6 "If you need help outside my normal hours, please contact Paul Chu." +a
To add an image to Susan's résumé, upload the image file to the message addressed to Batch Admin and enter:
PUT RESUME sbram 1001 122 "sbramphoto.jpg" +F
PUT RULES example
To disable the Employee Lounge's advanced rule called "File by Subject", enter:
PUT RULES "General Conferences:employee lounge" "file by subject" 13800 6 0
COMPILE "General Conference:employee lounge"
To disable the Employee Conferences group's advanced rule called "File by Subject", enter:
PUT MODEL RULES "Employee Conferences" "file by subject" 13800 6 0
COMPILE MODEL "Employee Conferences"
To disable Susan Bram's Mailbox's advanced rule called "File by Subject", enter:
PUT RULES DESKTOP sbram "Mailbox" "file by subject" 13800 6 0
COMPILE DESKTOP sbram "Mailbox"
PUT SEARCH userID example
The SEARCH object type sets the parameters on the search form.
To set sbram's search form to show more all options (1229) search subcontainers (1204), enter:
PUT SEARCH sbram 1229 6 1 1204 6 1
PUT SYSPROFILE example
The SYSPROFILE object type updates fields on the System Profile form.
To set the server priority to High, enter:
PUT SYSPROFILE 1226 7 0
To change the priority to Medium, the fieldvalue would be 1, and for Low priority, the fieldvalue would be 2.
Note
The server stores time in seconds. There are 86400 seconds in a day. Exercise caution when updating the Private mail expiry and Conference item expiry fields. A fieldvalue of 60 would be 60 seconds, not 60 days. Any field value less than a day is ignored.
The GET command can help you create PUT commands. For example, if you wanted to add a voice DN (field ID 1255) and voice password (field ID 1256) to all your users, you could use the GET command to help you create the PUT syntax.
1 Open Example.fc using FirstClass Designer.
2 Open the User Data form (form ID 125) to look up the field IDs.
3 Fill in the Voice DN and Voice password of any user.
4 Send a GET command:
REPLY
GET USER sbram 1255 1256
The server will return the field ID, field type and field value:
1255 0 "9055551212" 1256 0 "1212"
5 Compose the PUT command by replacing the field value with appropriate data. To add a voice DN and voice password to Paul Chu's account:
PUT USER pchu 1255 0 "9055551213" 1256 0 "1213"
If you create an object, and then fill in the field contents, you can use Previous to substitute for the path.
For example, if you created a user group and wanted to set the Organizational Unit (field ID 1272) to Department, enter:
New groups "Employee" "" FormDoc 23003 3 302 124
Put Previous 1272 7 600
PUT PERMISSIONS
The PERMISSIONS keyword updates the fields on the conference Permissions form, the Mailbox Permissions form, the contact database Permissions form, and the calendar Permissions form. There are two types of permissions forms. The first is used with the container groups and calendar groups located in the Groups folder on the admin Desktop. The second is used with a Mailbox, contact database, conference or calendar. Each form has its own syntax. The EXPORT command can be used to extract the permissions of an existing conference contact database, or calendar.
The conference Permissions form is called ACL, form ID 103 in Example.fc. Calendar Permissions is form ID 64, Conference Group Permissions is form ID 100, Calendar Group Permissions is form ID 63 and the Contact Database Permissions is form ID 55.
Syntax
• for "Who", "Access", and "Permissions" field (29) on the Permissions form for container or calendar groups:
Note
The field ID for setting both the "Who" and "Access" fields is 29. Both parameters are set at the same time.
PUT PERMISSIONS MODEL groupname path 29 index name fieldvalue
• for other fields on the Permissions form for a container or calendar group:
PUT PERMISSIONS MODEL groupname path fieldlist
• for "Who', "Access", and "Permissions" field (29) on the Permissions form for a conference or calendar
Note
The field ID for setting both the "Who" and "Access" fields is 29. Both parameters are set at the same time.
PUT PERMISSIONS path 29 index name fieldvalue
• for other fields on the Permissions form for a conference or calendar
PUT PERMISSIONS path fieldlist
Parameters
path Conference or calendar specified by the path, relative to the administrator's Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
groupname The name of the conference group or calendar group.
index The position to insert in the list. Use 0 for the first name, 1 for the second name, and so on.
fieldlist A list of field descriptor triplets of the form:
fieldID fieldtype fieldvalue
fieldID The field ID.
fieldtype The field type. Supports:
0=String, includes fields defined as text and editable lists.
6=CheckBox, includes fields defined checkboxex and radio groups.
7=Popup, includes fields defined as a static lists and icons.
14=Number, includes fields defined as numeric and date & time.
fieldvalue The field value. May be enclosed in quotes if needed. The field value must be numeric for Checkbox, Popup and Number. Popup values can be found using FirstClass Designer.
Examples
To set the permissions of a container group called "Employee Conferences" so that the Employee group is a contributor, type the following:
PUT PERMISSIONS MODEL "employee conferences" "" 29 0 "Employee" 87552
Note
When working with container groups the path is always represented by empty quotation marks.
To set the permissions for the Employee Lounge conference so the Employee group members are contributors and All Users are disallowed, enter the following:
PUT PERMISSIONS "General Conferences:employee lounge" 29 0 "employee" 122624 29 1 "all users" 0
To make an unpublished conference a member of the Employee Conferences and Custom Columns container groups, enter:
PUT PERMISSIONS "General Conferences:secret employee lounge" 19 0 "Employee Conferences" 19 1 "Custom Columns"
Note
To make conference whose name appears in the Directory a member of a group see PGADD. PGADD command does not require a path, just the container name.
To create custom permissions, add the values of all the permissions you want assigned to the user, group, or gateway as the value of fieldvalue.
The value of the send permission is 2048 and the value of Delete own items is 256. Adding these two values together will give you a field value of 2304.
To set the permissions of the Employee Lounge conference to enable all users to send and delete their own mail, enter:
PUT PERMISSIONS "General Conferences:employee lounge" 29 0 "all users" 2304
To set the permissions of the Employee Conferences group to enable the employees to send and delete their own mail, enter:
PUT PERMISSIONS MODEL "Employee Conferences" "" 29 0 "Employee UG" 2304
To set the permissions of Susan Bram's Mailbox so Paul Chu to Send and Unsend, you would enter
PUT PERMISSIONS desktop sbram mailbox 29 0 "Paul Chu" 2304
To stop Susan Bram from recieving any Internet mail, enter the following:
PUT PERMISSIONS desktop sbram mailbox 29 0 "internet" 0
To set the permissions of the Customer List contact database so that Sales can create and modify entries, employees can read the entries and everyone else is disallowed, enter the following:
PUT PERMISSIONS "General Conferences:Employee Lounge:Customer List" 29 0 "Sales" 131054 29 1 "Employees" 29 2 "All Users" 0
Field values for preset conference permissions:
Value Permission Set
0 Disallowed
512 Summary
4608 Browser
87552 Reader
122624 Contributor
122752 Approver
122798 Moderator
131054 Creator
131071 Controller
Field values for individual conference permissions:
Value Permission
1 Edit permissions
2 User is the moderator
4 Delete any item
8 Directly create items
16 Edit read only items
32 Edit items
64 Save window and view properties
128 Approve items
256 Delete own items
512 Open conference
1024 Search
2048 Send
4096 Open items
8192 Create subconferences
16384 Download files and attachments
32768 View permissions
65536 View history
To create custom permissions add the values of all the permissions you want assign to the user, group, or gateway as the fieldvalue.
Field values for preset calendar permissions:
Value Permission Set
0 No Access
2097152 See Times
2304 Schedule Only
2099456 Schedule+Times
2100992 Schedule+Details
2219821 Editor
Field values for individual calendar permissions:
Value Permission
0 Disallowed
1 Edit permissions
2 Moderator
4 Delete any item
8 Create items
16 Edit read only
32 Edit items
64 View properties
128 Approve items
256 Delete own items
512 View unrestricted details
1024 Search items
2048 Add participants
4096 Open items
16384 Download files
32768 View permissions
65536 View history
2097152 Open calendar
Field values for preset calendar permissions:
Value Permission Set
0 No Access
2097152 See Times
2304 Schedule Only
2099456 Schedule+Times
2100992 Schedule+Details
2219821 Editor
Field values for preset contact database permissions:
Value Permission
0 Disallowed
512 View List
87552 Open Items
131054 Creator
The form ID of the Phone Call form is 128. To set the "Form to use" field (field ID 2008) to the Phone Call form on the Permissions form of a conference called Employee Lounge, enter:
PUT PERMISSIONS "General Conferences:Employee Lounge" 2008 14 128
The form ID of the Phone Call form is 128. To set the "Form to use" field (field ID 2008) to the Phone Call form on the Permissions form of a conference group called Employee Read, enter:
PUT PERMISSIONS MODEL "Employee Conferences" "" 2008 14 128
To set Employee Lounge's "Message expiry" to Never, enter
PUT PERMISSIONS "General Conferences:Employee Lounge" 1004 14 214849374
To set Employee Lounge's "Message expiry" to 1 day, enter
PUT PERMISSIONS "General Conferences:Employee Lounge" 1004 14 86400
To set Employee Conference group's "Message expiry" to Never, enter
PUT PERMISSIONS MODEL "Employee Conferences" "" 1004 14 214849374
To set Employee Lounge's "Message expiry" to 1 day, enter
PUT PERMISSIONS MODEL "Employee Conferences" "" 1004 14 86400
Notes
The server stores time in seconds. There are 86400 seconds in a day. A fieldvalue of 60 would be 60 seconds, not 60 days. Any fieldvalue less than a day is ignored.
To make an existing conference or calendar unpublished, enter:
PUT PERMISSIONS "General Conferences:Employee Lounge" 2007 6 1
PUT PERMISSIONS "General Conferences:Employee Lounge:Staff Calendar" 2007 6 1
Related commands
To fully update the Permissions form, four commands are required.
The About button gives you access to the published conference's Résumé. Use PUT ABOUT <conference name> to update. Use PUT ABOUTPATH for unpublished conferences.
The Directory info button gives you access to the Directory form. Use PUT DIRECTORY CONFERENCE <conference name> or Use [Link]PUT DIRECTORY CALENDAR <calendar name> to update.
The group membership of a published container is updated with the PGADD or PGDEL command. The group member of an unpublished container is updated with PUT PERMISSIONS
PW
Sends the FirstClass scripting password to the FirstClass scripting component. The command uses the first line in the script. The password does not override restrictions placed on the EXPORT command and the password field. Only the admin account can submit an EXPORT command and retrieve passwords.
Syntax
PW password
Parameter
password The password (maximum 12 characters).
Example
If the batch admin password is f1504x2s, and if you are not the administrator, enter:
PW f1504x2s
Note
If you are not the administrator, you must submit the password before any other commands. If you do not, your commands are not processed.
REMOVE
Deletes an object. The command will remove rules and uploaded resources from a User Group or Container Template. The command does not support the removal of rules and uploaded resources at a container level. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Syntax
REMOVE targetpath -p +q
Parameters
path Target path is relative to the administrator’s Desktop.
DESKTOP userID path The user ID of the user from whom you want to remove items. Path is relative to the user's Desktop.
MODEL groupname The name of the user group or container group.
-p Optional. Deletes target even if protected.
+q Optional. If target is missing, do not notify.
+x Required when working with the resources folder of a user group or container group.
Examples
To remove the London gateway, you would enter:
REMOVE "Gateways:London" -p
To remove sbram's Presentations conference enter:
REMOVE DESKTOP sbram "Presentations" -p
To remove a rule from a container group, enter:
REMOVE MODEL "Employee Read Conferences" "" "Mark as Urgent" +X
An empty set of quotation marks always follow the group name.
To remove an uploaded resource from a user group, enter:
REMOVE MODEL "Employee" "" "new_desktop.jpg" +X
An empty set of quotation marks always follow the group name.
RENAME
Renames an unprotected object. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Syntax
RENAME targetpath objname
Parameters
targetpath The path relative to the administrator’s Desktop.
DESKTOP userID targetpath The path relative to the user's Desktop. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path
character.
objname The new name of the object.
Example
To rename a conference from Employee Lounge to Staff Lounge, enter:
RENAME "General Conferences:employee lounge" "Staff Lounge"
To rename a conference on sbram’s Desktop from Presentations to Obsolete Presentations, enter:
RENAME DESKTOP sbram "Presentations" "Obsolete Presentations"
If the Presentations conference is protected, you will need to unprotect it first with the PUT PROPERTIES DESKTOP command.
A leaf or container cannot be renamed if it is protected or read only. Rather than writing 3 commands to turn these attributes off, rename the object, then turn the attributes on again, you can rename an object with the PUT command and Properties keyword.
PUT PROPERTIES DESKTOP sbram "presentations" 1017 0 "Obsolete Presentations"
The "Protected" field on the Properties (Windows) or Get Info (Mac OS) is 1016. Sending a command to unprotect an already unprotected command is preferable to have the Rename command fail.
REPEAT
The REPEAT command will immediately exit the script and start over again. A script can only include one REPEAT command, multiple REPEAT commands will terminate the script immediately. Script execution will continue if the REPEAT command terminates normally.
Syntax
REPEAT fieldID
Parameters
fieldID Target field
fieldID.-1 Target field is a duplication group field.
Example
A custom message contains duplication field.
The message body contains a script that simply returns the contents of the fields 12001, 12002, 12003. The suffix .-1 will automatically match the iteration to the index of the duplication group field.
IF REPEAT == 1
REPLY
ENABLEFIELDSUBSTITUTION
ENDIF
//Set of commands to execute
//Use 12001.-1 for the contents of Variable 1 field
//Use 12002.-1 for the contents of Variable 2 field
//Use 12003.-1 for the contents of Variable 3 field
Write Variable 1 = #12001.-1, Variable 2 = #12002.-1, Variable 3 = #12003.01
//Execute these commands once, for each row of Variable 1 field 12001
//The row must have an entry in the 12001 field
REPEAT FIELD 12001.-1
The server returns the following:
Variable 1 = Index 0, Field 12001, Variable 2 = Index 0, Field 12002, Variable 3 = Index 1, Field 12003
Variable 1 = Index 1, Field 12001, Variable 2 = Index 1, Field 12002, Variable 3 = Index 1, Field 12003
Fifty-three users have an original, protected folder named "2001 Sales Presentations". If you can generate a list of user IDs with LIST faster than typing them in the form, you can create the message and fill the fields with scripting:
SetBase Mailbox
SetRelative FromBase Path ""
// Reference: 1:87675
New Relative "" "batch admin" "Delete Sales Presentation folder" Form 7014 0 0 12004 87675 -U
Put Previous 8120 7 1252 8140 0 8141 0 8126 -1018972474 9 ""
Put Previous 8 "Administrator" -V
Put Previous 4 0 "batch admin" -V
//Message body, note the nested quotation marks
Put Previous 6 'EXECUTE SCRIPT PATH "scripts:DeleteFolder"'
//Add these 53 names to the Variable 1 field
Put Previous 12001.0 0 "SBram"
Put Previous 12001.1 0 "PChu"
//And so on until the last userID
Put Previous 12001.49 0 "SCurry"
SetRelative FromBase Path ""
Within Employee Lounge there is a Contact Database, and you want create an alias of this in all the Contacts folders of your sales staff. You know that some Sales staff have already done this, but you want to make sure every team member has the Contact Database. In addition, the name of the Contact Database had changed from Customers to East Coast Customers. So there are two issues to solve, renaming existing alias and creating an alias if one doesn't exist.
Create a custom message form as above, fill in the user IDs, and add this script to the message body.
IF REPEAT == 1
ENABLEFIELDSUBSTITUTION
ENDIF
//Check to see if a user has an alias to Customers in the Contacts folder
IF OBJECT desktop #12001.-1 "Contacts:Customers" EXISTS
// if the above statement is true then rename
rename desktop #12001.-1 "Contacts:Customers" "East Coast Customers"
ELSE
//if the above is false, create the alias.
LINK SPECIAL desktop #12001.-1 "Contacts" "General Conferences:Employee Lounge:East Coast Customers"
ENDIF
REPEAT FIELD 12001.-1
If you want to reuse scripts or keep a stock of standard scripts, you can create a protected folder on your admin Destkop and put the scripts in documents. Your message would contain only one command:
EXECUTE SCRIPT PATH "scripts:DeleteFolder"
The DeleteFolder document would contain the following script.
IF REPEAT == 1
ENABLEFIELDSUBSTITUTION
ENDIF
//Set of commands to execute
//Use 12001.-1 for the UserID
//Remove comments to see the value of 12001 on the console
//Write +c Variable 1 = #12001.-1
REMOVE DESKTOP "#12001.-1" "2001 Sales Presentations" +p
//Execute these commands once for each row
//The row must have an entry in the 12001 field
//If field 12001 has 53 entries the above command will be executed 53 times
REPEAT FIELD 12001.-1
REPLY
Requests generated output to be sent back to you as a reply. It must be used with the GET, GETADMIN, LIST SNAPSHOT, and DIAGNOSEDIR commands. It can be used with most commands. Some commands reply only if the command is unsuccessful. You can also enable the Batch Admin Log at the Server console by choosing Logging > Batch Admin Log.
Syntax
REPLY
To send the reply to another user, use the syntax:
REPLY name
To set the subject of the reply
REPLY subject name +s
Parameters
name A name from the FirstClass Directory as it would appear if you were addressing mail to that individual or conference.
subject The text that will be in the subject field of the message.
+s Optional. Uses first variable as the subject.
Example
To produce and export a list of all users, and to view the output as a message, enter:
REPLY
LIST +ur
To send a reply to a user named Susan Bram, with the subject "Registration Confirmed"
REPLY "Registration Confirmed" "Susan Bram" +s
WRITE You are confirmed in the April 11, 2007 event.
To send a reply to an email address of sbram@huskyplanes.com, with the subject "Registration Confirmed"
WRITE You are confirmed in the April 11, 2007 event.
If the reply is sent to the user is part of a larger script you may want to use the EXECUTE command to branch to another script that contains just the text you want to send to the user as this will prevent the user receiving the scripting replies that pertain to the rest of the larger script.
//many commands precede this commandEXECUTE SCRIPT PATH ADMIN DESKTOP "scripts:userconfirm"
SETEXPORTFILTERS
Used with the EXPORT command to filter the results of the information returned in the import script. You can specify items based on the last modified date or message thread ID.
Syntax
SetExportFilters THREAD <Thread Site ID> <Thread ID> MODIFIED AFTER <Date> MODIFIED BEFORE <Date> options
Parameters
THREAD "Thread Site ID" "Thread ID"
Returns a script based on the thread ID of the message.
MODIFIED AFTER "specified date"
Returns a script based on the last modified date.
MODIFIED BEFORE "specified date"
Returns a script based on the last modified date.
+D Used with the MODIFIED parameter to enter a formatted date. This option is case sensitive.
Examples
To export a series of messages based on the thread ID, you would enter:
SETEXPORTFILTERS thread 34537 35410266
EXPORT "General Conferences:staff lounge"
To display the thread site ID and thread ID, press the control + shift key and click on the last column in the list view, and then choose Thread ID from the drop down menu.
To export a series of messages created on April 21, 2007, enter:
SETEXPORTFILTERS modified after "2004/04/20" modified before "2007/04/22" +D
EXPORT "General Conferences:staff lounge"
To export a series of messages before April 21, 2007, enter:
SETEXPORTFILTERS modified before "2007/04/22" +D
EXPORT "General Conferences:staff lounge"
To export a series of messages after April 21, 2007, enter:
SETEXPORTFILTERS modified after "2007/04/21" "" +D
EXPORT "General Conferences:staff lounge"
SETEXPORTOPTIONS
Used with the EXPORT command to change the default attachment name, create a text file that includes the import script, and specify the base path in the import script. This command is useful to FirstClass Application Developers.
Syntax
SetExportOptions ATTACH <AttachmentName> EXTENSION <ExtofAttachments> TARGET <BasePathforImport>
Parameters
ATTACH <AttachmentName> Maximum 20 characters.
EXTENSION <ScriptExtension> The extension of the file that will contain the import script.
TARGET <BasePathforImport> The base path for the import script. If this is not specified the script will include <ObjDesc>.
Example
The export the Employee Lounge conference and have the server use "lounge" for all attachments instead of Attach, enter the following:
SetExportOptions attach lounge
EXPORT "general conferences:employee lounge"
You want to import script attachment names to begin with "lounge", a text file the containing the export script to end in the extension txt, and the import script to set the base path to be "General Conferences:Employee Lounge Backup", then enter the following:
SetExportOptions attach lounge extension txt target "General Conferences:Employee Lounge Backup"
EXPORT "general conferences:employee lounge"
The server will return a message like this, the lounge.txt file contains the import script.
SETOU
Specifies to which group a user or container will be added.
Syntax
SETOU groupname
Parameter
groupname The name of the user group. The group does not need an Organizational Unit defined.
Example
To add another user called Susan A Bram to the Consultant group, you would enter:
SETOU consultant
add network susan susan a bram "" carrot
UPDATE
Updates a file. Generaly used to merge a new settings files with an existing settings file within FC Resource Registry.
Syntax
UPDATE path name +b
Parameters
path Target path is relative to the administrator’s Desktop.
name The name of the file, including any extensions.
+b Uploads a file contained in on the hard drive in FCNS/SERVER/BATCH folder.
Example
To add the resources contained in in the newforms.fc settings file to English Resources and en.rez, upload the newforms.fc file to the message and enter the following two commands:
UPDATE "multi-site setup:fc resource registry:english resources" "newforms.fc"
UPDATE "multi-site setup:fc resource registry:en.rez" "newforms.fc"
SETBASE
Used to specify a path that subsequent commands can refer to for the path based on a registered application folder or a the current user. Once the SETBASE is defined the RELATIVE command can be used instead of an explicit path.
Syntaxes
To specify the path relative to a registered application folder
SETBASE appid +APP
SETRELATIVE FROMBASE ""
To specify the path relative to a user's Desktop
SETBASE +USER
SETRELATIVE FROMBASE ""
To specify a path relative to the container or container template where the rule is executed
SETBASE +ORIGIN
SETRELATIVE FROMBASE ""
Examples
You've created a local application with an ID of 4001. Instead of specifying "firstclass applications:local application" as the path in every command, do this:
SETBASE 4001 +APP
SETRELATIVE FROMBASE ""
PUT properties RELATIVE "document a" 1016 6 1
An application rule includes the execution of a script, the following would act of the Desktop of the user who runs the rule.
SETBASE +USER
SETRELATIVE FROMBASE ""
PUT properties RELATIVE "Home Page" 1016 6 0
RENAME RELATIVE "Home Page" "My Web Site"
An application rule includes the execution of a script, the following would act in the container where the rule is executed.
SETBASE +ORIGIN
SETRELATIVE FROMBASE ""
NEW RELATIVE "Project Members" "" FOLDER 20439 0 0
SETRELATIVE "" and RELATIVE ""
Used to specify a path that subsequent commands can refer to for the path. Once the SETRELATIVE is defined the RELATIVE command can be used instead of an explicit path.
Syntaxes
SETRELATIVE <path> ""
A set of empty quotation marks always follow SETRELATIVE
<command> RELATIVE path
A set of empty quotation marks can be used if a subcontainer is not required.
Examples
To create 3 addresses in Susan Bram's Contact's folder, enter
SETRELATIVE DESKTOP sbram "Contacts" ""
NEW RELATIVE "" "Paul Chu" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Roy Allen" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Amanda Ho" "" FormDoc 23023 434 49 105
To create the same set of addresses in two user's Contacts folder:
SETRELATIVE DESKTOP sbram "Contacts" ""
NEW RELATIVE "" "Paul Chu" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Stanley Matthews" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Amanda Ho" "" FormDoc 23023 434 49 105
SETRELATIVE DESKTOP rallen "Contacts" ""
NEW RELATIVE "" "Paul Cnu" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Stanley Matthews" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Amanda Ho" "" FormDoc 23023 434 49 105
Susan's My Web Site folder has three preexisting subfolders, the following command will place a home page document in each of the three folders:
SETRELATIVE DESKTOP sbram "My Web Site" ""
NEW RELATIVE "Project A" "Home Page" "" Document 23019 30 15 900
NEW RELATIVE "Project B" "Home Page" "" Document 23019 30 15 900
NEW RELATIVE "Project C" "Home Page" "" Document 23019 30 15 900
To create 3 addresses and a Home Page document for Susan Bram, enter
SETRELATIVE DESKTOP sbram "Contacts" ""
NEW RELATIVE "" "Paul Chu" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Roy Allen" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Amanda Ho" "" FormDoc 23023 434 49 105
SETRELATIVE DESKTOP sbram "My Web Site" ""
NEW RELATIVE "" "Home Page" "" Document 23019 30 15 900
SETRELATIVE can also be set to Susan's Desktop, and the RELATIVE command can specify a subfolder.
SETRELATIVE DESKTOP sbram ""
NEW RELATIVE "Contacts" "Paul Chu" "" FormDoc 23023 434 49 105
NEW RELATIVE "Contacts" "Roy Allen" "" FormDoc 23023 434 49 105
NEW RELATIVE "Contacts" "Amanda Ho" "" FormDoc 23023 434 49 105
SETRELATIVE DESKTOP sbram
NEW RELATIVE "My Web Site" "Home Page" "" Document 23019 30 15 900
Related commands
When creating new objects, the PREVIOUS command can be used to work with the object just created. As soon as a different command is encountered the PREVIOUS command cannot be used.
Examples
To add content to the three addresses created for Susan Bram, enter.
SETRELATIVE DESKTOP sbram "Contacts" ""
NEW RELATIVE "" "Paul Chu" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Stanley Matthews" "" FormDoc 23023 434 49 105
NEW RELATIVE "" "Amanda Ho" "" FormDoc 23023 434 49 105
SNAPSHOT
Returns the view properties of a conference in the format of a PUT command. The EXPORT command generates a script that can include view properties. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character.
Syntax
REPLY
SNAPSHOT path
Parameters
path The location of the container, relative to the administrator's Desktop.
DESKTOP userID path The location of the container, relative to the users's Desktop.
Examples
To apply the view properties of one conference to another conference:
1 Configure the view properties of a conference, including split, size, column order, column width, where it appears on the computer desktop, in addition to the choices presented on the View Properties form.
2 Enter the following command:
REPLY
SNAPSHOT "General Conferences:Employee Lounge"
The server returns the following information (comments are not included):
//size and location of window, split location and size, and location
Put "General Conferences:employee lounge" 900 51 901 271 902 10 903 621 904 735
//columns to include in list view
Put "General Conferences:employee lounge" 13000.0 122 0008000500100009000C000A000C0007008200060028FFFD000E000800DC00020064 -S
//View properties of upper window
Put "General Conferences:employee lounge" 13075.0 7 8 13016.0 7 0 13015.0 0 "" 13065.0 14 -2147483646 13062.0 7 13 13063.0 7 13 13064.0 7 0 13074.0 7 2 13084.0 7 1 13053.0 7 0 13003.0 7 24 13082.0 7 80 13083.0 0 "l_pane1.png"
Put "General Conferences:employee lounge" 1101.0 14 10289154
Put "General Conferences:employee lounge" 13100.0 122 0007000500100009000C000A000C0007008200060028000800DC00020064 -S
//View properties of lower window
Put "General Conferences:employee lounge" 13175.0 7 -1 13116.0 7 0 13115.0 0 "" 13165.0 7 8 13162.0 7 13 13163.0 7 13 13164.0 7 0 13174.0 7 0 13184.0 7 0 13153.0 7 0 13103.0 7 24 13182.0 7 32 13183.0 0 ""
3 Forward the message sent by the server, and address the new message to Batch Admin.
4 Choose Edit > Replace and insert the path of the conference you want to apply the view properties to.
After the server processes the command, the conference will have the same view properties as the original conference.
The view properties can be applied to a user's Desktop by changing path. For example, to apply the same view properties to Susan's Desktop, you'd change the path from
PUT "private conference:employee lounge"
to
PUT DESKTOP sbram ""
The quotation marks represent the path of the Desktop.
Related commands
REPLY is required by the SNAPSHOT command. The EXPORT command also returns the view properties of a container.
VAR
Declare local variables. Enables you to create variables to use within a script. The VAR command is often used with the ASSIGN command to store the variable's value.
VAR Syntax
• for declaring a string or numeric variable
VAR VarName = Value
• for declaring a variable relative to today's date
VAR VarName nDays +d
Parameters
VarName Name of the variable. Maximum 50 characters. VarName must be unique with the script.
= Required for numeric variables, optional for strings.
Value Initial value of field. Required for numeric, optional for strings.
nDays Optional. Only used when with the +d option.
+d Creates a date string.
Operations + - * /
ASSIGN
Define where you want to use a declared local variable created with the VAR command.
Syntax
• for assigning a variable to a local form
ASSIGN VarName FIELD TargetField FieldType
• for assigning a variable to a specified form
ASSIGN VarName FORMFIELD path TargetField FieldType
Parameters
VarName Either a declared variable name. Do not use command names or keywords.
FIELD Assign variable to the message form that accompanies the script. Also applies to application Rules that executes a batch admin script.
FORMFIELD path Field on the specified form, includes path to specified form.
TargetField Field ID. The field ID should be over 1000.
FieldType 0= String
6= Checkbox
7= Short Number
14= Long Number
Example list
Related commands and rule actions
The VAR and ASSIGN commands complement other methods of capturing field values. You can create custom forms and reference the field number within your script using field substitution.
The Application Rule's Run Batch Admin Script gives you access to session data, enabling you to include pre-defined variables for the current user's name, ClientID, UserID, primary organization group, current date and current time.
The Application Rule's Get Confirmation action retains the field data entered in to the confirmation form. Though the default confirmation form only contains a name field, application developers can create custom forms that contain fields required for the application.
See ENABLEFIELDSUBSTITUTION for more information.
About fields and field types
The ASSIGN command requires you indicate a field type (0, 6, 7, 14). The server is unaware of what fields exist on any form so you can define any field ID and type you wish. There's no need to update your forms just because you want to store field data.
The fields you create in Designer have pre-determined fields types.
Strings Can contains alpha or numeric values. In Designer, guide text, editable text, and an editable selection list all store strings. All string fields have a field type of 0.
Numbers There are 3 types of number fields.
Short numbers are stored when you create a static selection list, number icon, or radio button. These fields will store a field type of 7.
Long numbers are stored for date fields. Long numbers have a field type of 14. In FirstClass reserved forms 7 and 14 are often used interchangeably.
Checkboxes have a field type of 6. By default a checkbox has 3 values 0, 1 & 2, but the Designer supports up to 10 different states for a checkbox. If you are going to store numbers above 3 in a checkbox, you need to make sure your form is set up to display the optional states.
Examples
The following examples are valid numeric variables.
To set a numeric variable to 42, do this:
//Initialize a numeric variable named RegionCode
VAR RegionCode = 42
Get the variable value from a numeric field on a form. The numeric field ID is 8067 and the Region Codes form located within the Projects Application folder.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 0
//Set the RegionCode variable to the current value of field 8067
RegionCode = FORMFIELD "FirstClass applications:projects application:region codes" 8067
When executing a script from and advance from the FIELD keyword is used. You have a rule that executes a script contained in a document within the Project Applications folder. The document is named "Close Project".
//Initialize a numeric variable named Region
VAR RegionCode = 0
//Set the RegionCode variable to the current value of field 8067
RegionCode = field "FirstClass applications:projects application:close project" 8067
The following examples are valid string variables.
//Declare a string variable, the string has no initial content
VAR RegionName
//Declare a string variable, where the initial value is Sheffield
VAR RegionName = "Sheffield"
VAR and IF examples
If you have a long and complicated application install script the VAR can be used as a convenient way of changing the behavior of the your script just by adjusting the variables. Your script would be written so that each major section would check for the value of the variables and run commands based on the results.
//If this variable is equal to 1 install the Projects application
VAR Project = 1
//If this variable is equal to 1 install the CRM application
VAR management = 1
IF Project == 1
//a small or large set of commands to perform
write Install the Projects application
ENDIF
IF CRM == 1
//a small or large set of commands to perform
write Install CRM application
ENDIF
If you only wanted to install the Project application you would change,
IF management == 1 to IF management == 0
then run the script.
The VAR value can also be set by using the IF command. For example, if an object exists then set the VAR value to 1, if it is missing set the VAR value to 0.
IF OBJECT "FirstClass applications:projects application" MISSING
VAR Project = 0
Write +c Installing Projects Application
ELSE
VAR Project = 1
Write +c Upgrading Projects Application
ENDIF
VAR, ASSIGN and ENABLEFIELDSUBSTITUTION examples
To set the region code to 42 and put the value of the variable into the Region Codes document, enter.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 42
ASSIGN RegionCode FORMFIELD "FirstClass Applications:Projects Application:Region Codes" 8067 7
To set the RegionCode to 42 and store the value in field 1001 of the message sent to Batch Admin. ENABLEFIELDSUBSTITUTION is used to write the contents of field 1001 to server console.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 42
ASSIGN RegionCode FIELD 1001 7
ENABLEFIELDSUBSTITUTION
WRITE +c #1001
After the message is sent to Batch Admin, the message form will have a 1001 field with a value of 42. The server is unaware of what fields exist on a form, so the FIELD parameter can be used to populate fields even if they do not exist on the form. Once you assign the value to the local form any valide command can be used.
Get the variable value from a numeric field on a form. The numeric field ID is 8067 and the Region Codes document located within the Projects Application folder. When creating or troubleshooting a script you may find it useful to have the value displayed on the server console. Adding a REPLY command to the script will send a message that will contain the variable value.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 0
//Set the RegionCode variable to the current value of field 8067
RegionCode = FORMFIELD "FirstClass applications:projects application:region codes" 8067
ASSIGN RegionCode FIELD 1001 7
ENABLEFIELDSUBSTITUTION
WRITE #1001
Note
You cannot assign the contents of a string fields to another field, as this function is not supported.
Get the variable value from a numeric field on a form and assign it to a second document. The field IDs can be different. You must initiate a field type. The numeric field ID is 8067 and its field type is 7. The Region Codes form located within the Projects Application folder. The variable value is then assigned to another document named Target.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 0
//Set the RegionCode variable to the current value of field 8067
RegionCode = FORMFIELD "FirstClass applications:projects application:region codes" 8067
ASSIGN RegionCode FORMFIELD "FirstClass applications:projects application:target" 8066 7
The following commands will also accomplish the same task, but use the ENABLEFIELDSUBSTITUTION and the PUT command.
//Initialize a numeric variable named RegionCode
VAR RegionCode = 0
//Set the RegionCode variable to the current value of field 8067
RegionCode = FORMFIELD "FirstClass applications:projects application:region codes" 8067
ASSIGN RegionCode FIELD 1001 7
ENABLEFIELDSUBSTITUTION
PUT "FirstClass applications:projects application:target" 8066 7 #1001
Once you assign the value to the local form any command can be used.
Creating a counter
When new a Project is created, it is assigned a project code. Within the Projects Applications is a Project Code document that has custom field that stores numeric value. The application designer has chosen fieldID 12215. The field currently has a value of 1000. The first time this script is run a folder named 1001 will be created. The second time this script is run a folder named 1002 is created.
//Create and set the initial value for a variable named ProjectCode
VAR ProjectCode = 0
//get current value COUNTER from the form
ProjectCode = ProjectCode + FORMFIELD "FirstClass applications:projects application:project code" 12215
//increase the ProjectCode variable by 1
ProjectCode = ProjectCode + 1
//put the new value into the Project Code document
ASSIGN ProjectCode FORMFIELD "FirstClass applications:projects application:project code" 12215 7
ENABLEFIELDSUBSTITUTION
ASSIGN ProjectCode FIELD 1001 0
//Create new folder based on the project code
NEW "FirstClass applications:projects application" "#1001" "" FOLDER 24043 -1 -1
In this example, Susan has a Project Preferences document within her My Projects folder. Susan has used this document to choose an icon for her new Project folders. To create a new project, Susan executes an application rule that runs a script. This portion of the script looks up the value of the icon id and uses it for the icon of new project folders.
ENABLEFIELDSUBSTITUTION
//sets the path from the desktop of the user that runs the rule
SETBASE +USER
//this command enables you to use the keyword RELATIVE in place of DESKTOP <userID>
SETRELATIVE FROMBASE ""
//define a numeric variable
VAR ProjectIcon = 0
//get value of icon field from the Project Preferences form, the field ID for the icon field is 12209
//in this case RELATIVE is equivilent to DESKTOP sbram
ProjectIcon = ProjectIcon + FORMFIELD RELATIVE "My Projects:Project Preferences" 12209
//assign the ProjectIcon to a local field, icon field are field type 7
ASSIGN ProjectIcon FIELD 1009 7
//uncomment the next line to see the value of field 1009 on the server console
//write +c The folder will be created with icon number #1009
//Create a new project folder, use the ProjectIcon
NEW RELATIVE "My Projects" "Project Highland" "" FOLDER #1009 -1 -1 +p
Date examples
The VAR command has an option to capture a date string relative to today's date.
In this example, an application installation script records the date of installation.
// create the string variable to hold today's date
VAR Today +D
//put today's date in a form's field 8021
ASSIGN Today FORMFIELD "FirstClass applications:projects application:Project Preferences" 8021 0
If you wanted to capture a date string for 7 days in the future, enter the following:
// create the string variable to hold date one week from today.
VAR NxtWeek 7 +D
/
/put next week's date in a form's field 8021
ASSIGN NxtWeek FORMFIELD "FirstClass applications:projects application:Project Preferences" 8021 0
If you wanted to capture a date string for 7 days in the past, enter the following:
// create the string variable to hold date one week ago.
VAR LstWeek -7 +D
//put last week's date in a form's field 8021
ASSIGN LstWeek FORMFIELD "FirstClass applications:projects application:Project Preferences" 8021 0
Mathematical operations
To add two variable and display the results on the server console, do this.
VAR PRICE = 100
VAR SHIPPING = 10
VAR TOTAL = 0
TOTAL = PRICE + SHIPPING
ASSIGN PRICE FIELD 1000 7
ASSIGN SHIPPING FIELD 1001 7
ASSIGN TOTAL FIELD 1002 7
ENABLEFIELDSUBSTITUTION
WRITE
WRITE PRICE IS SET TO #1000
WRITE
WRITE SHIPPING IS SET TO #1001
WRITE
WRITE TOTAL IS SET TO #1002
WRITE
Concatenating strings
To concatenate 2 strings, do this:
VAR Greeting = Dear
VAR Name = " Ms Bram
Greeting = Greeting + Name
ASSIGN Greeting FIELD 1001 0
ENABLEFIELDSUBSTITUTION
WRITE The greeting is #1001
If the user runs a manual application rule that executes a script, session data is available. The ENABLEFIELDSUBSTITUTION command has been placed before the first field substitution - #7100. This script uses the fully formatted name variable to create a greeting, in this script the variable greeting would be Dear Susan Bram:
ENABLEFIELDSUBSTITUTION
VAR Greeting = Dear
Greeting = Greeting + " #7100:"
ASSIGN Greeting FIELD 1001 0
WRITE The greeting is #1001
SETBASE examples
If an application has been registered in the Application Configuration form within FirstClass Applications, the SETBASE +APP <appNumber> command can be used. For example if the Projects Applications is registered as application number 4001 then this command
ASSIGN ProjectCode FORMFIELD "FirstClass applications:projects application:project code" 12215 14
could be written as:
SETBASE +APP 4001
ASSIGN ProjectCode FORMFIELD RELATIVE "project code" 12215 7
When Application Rule's Run Batch Admin Script action the the SETBASE +USER command can be used work with from the current user's Desktop.
//define a numeric variable
VAR ProjectIcon = 0
//get value of icon field from the Project Preferences form, the field ID for the icon field is 12209
ProjectIcon = ProjectIcon + FORMFIELD desktop sbram "My Projects:Project Preferences" 12209
could be written as:
//sets the path from the desktop of the user that runs the rule
SETBASE +USER
//this command enables you to use the keyword RELATIVE in place of DESKTOP <user>
SETRELATIVE FROMBASE ""
//define a numeric variable
VAR ProjectIcon = 0
//get value of icon field from the Project Preferences form, the field ID for the icon field is 12209
ProjectIcon = ProjectIcon + FORMFIELD RELATIVE "My Projects:Project Preferences" 12209
UPLOAD
Uploads a file to a conference or folder. Both the NEW command and the UPLOAD command are required. Separate the components of the path with colons. The PATHCHAR command can be used to change
the default path character.
Syntax
UPLOAD path filename +b
Parameters
path The location of the container, relative to the administrator's Desktop.
DESKTOP userID path The location of the container, relative to the users's Desktop.
filename The name of the file, including any extensions.
+b Uploads a file contained in the FCNS\Server\Batch folder.
Example
Both the NEW command and the UPLOAD command are required. You also need to attach the file to the message that contains the command. The form ID parameter is not required. For example, to upload the staff settings.fc file to Employee Lounge, enter the following:
NEW "General Conferences:employee lounge" "staff settings.fc" "" FCF 17044 -1 -1
UPLOAD "General Conferences:employee lounge:staff settings.fc" "staff settings.fc"
To upload a resource file to the Resources folder of a user group, enter:
NEW MODEL "Employees" "" "staff settings.fc" "" FCF 17044 -1 -1 +X
UPLOAD PREVIOUS "staff settings.fc"
COMPILE MODEL "Employees"
Note
When adding resource files to a group's resources folder, the name of the group must always be followed by empty quotation marks.
Related commands
The UPDATE can be used to merge FirstClass settings files.
WRITE
Specifies text that you want sent back to the administrator’s Mailbox in reply to a batch command
Syntax
WRITE +ct text
Parameters
+c Optional. Sends text to server console.
+t Optional. Includes time stamp.
text Maximum of 250 characters.
Examples
When you use the REPLY and NEW batch commands to create a conference, FirstClass sends you a reply only if the conference was not created correctly. However, you may want to receive a message indicating the script has completed. To achive this, enter:
REPLY
NEW "General Conferences:Employee Lounge" "" CONFERENCE 13107 10 10
WRITE Command completed.
Before writing a complex conditional script, you may find it helpful to start by confirming the IF command returns the expected results.
The following script will returns a message containing either True or False, depending on the existence of Employee Lounge conference within General Conferences.
IF OBJECT "General Conferences:Employee Lounge" EXISTS
WRITE True
ELSE
WRITE False
ENDIF
This simple step will eliminate the IF command when debugging your script. In this example, if False is returned, look for syntax or typing errors.
|