Advertising banner:
PUT  
Help Contents • Administration • FirstClass Scripting • Help Document
   
   
   
PUT
Examples



Function
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
Info for a conference or calendar. The name of the container appears in the Directory.
ABOUTPATH name
Info for a conference or calendar. The name of the container is hidden from the Directory.
USER userID
The 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 profile.
RULES path rulename
An 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 in the form:
fieldID fieldtype fieldvalue
fieldID
The field ID.
fieldtype
The field type:
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
Appends 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.



Examples
With ABOUT
To fill in the Conference Info form 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."
With ABOUTPATH
To fill in the Conference Info form 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 Conference Info form can be appended with the +a option.
With USER
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
With CLIENT
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"
06092010_122716_1.jpg        Note
Choose Admin > List Directory to obtain the correct client ID.
With DIRECTORY
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
06092010_122716_1.jpg        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.
With USERCONFIG
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.
Paths
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"
PUT "Mail Lists:Sales" 4 1 "sbram@springfield.com"
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"
PUT PREVIOUS 4 1 "sbram@springfield.com"
Adding text
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 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 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
With BYINDEX
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.
With DESKTOP
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:
PUT DESKTOP sbram "Presentations:To Paul" 4 0 "paulchu@springfield.edu"
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"
With ITEM
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
With MODEL
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.
06092010_122716_1.jpg        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
With PROFILE
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
With PROPERTIES
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
With PROPERTIES DESKTOP
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
With PREFERENCES
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
With RESUME
The RESUME object type adds content to a user's Profle form.
To add Susan Bram's name, enter:
PUT RESUME sbram 1006 0 "Susan" 1014 0 "Bram"
To add content to this profile, 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 profile, 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 profile, upload the image file to the message addressed to Batch Admin and enter:
PUT RESUME sbram 1001 122 "sbramphoto.jpg" +F
With RULES
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"
With SEARCH
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
With SYSPROFILE
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.
06092010_122716_1.jpg        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.
With Previous
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