Forum Replies Created
-
AuthorReplies
-
Simon,
Unfotunately Novell ‘broke’ the facility we were used to utilize a MIME (.MME) file as the master document in the personalize mass email applet. We recently reported this as a bug to Novell. I can’t tell you where Novell have prioritized this, or when it might be fixed.
In the meantime, you need to use HTM or TXT files as the master document to the merge, or install a copy of the 6.0.3 client on a machine you wish to use MME files with.
I’ll check the documentation to ensure this is made clear.
Advansys Support
Another example:
Dim iDlg HRT = Chr(13) & Chr(10) DB_NAME = Utilities.GetDataDirectory & "Test.mdb" const CAPTION = "Formativ Business Solutions" '------------------------------------------------------------------------------- ' Mainline processing '------------------------------------------------------------------------------- Sub Main(Client, GWEvent) dim FSO Dim iADOObj on error resume next set FSO = CreateObject("Scripting.FileSystemObject") ' Do we have the database in place? if FSO.FileExists(DB_NAME) then ' create a new instance of an ADO Connection object Set iADOObj = CreateObject("ADODB.Connection") if isobject(iADOObj) then ' open the test data source with the Connection object iConnnectString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & DB_NAME iADOObj.Open iConnnectString ' Are we connected? if err.number = 0 then ' Dialog IntroDlg select case iDlg.execute case Btn1 AddNewRecord(iADOObj) case Btn3 DisplayAllRecords(iADOObj) case Btn4 FindRecord(iADOObj) case Btn5 EditRecord(iADOObj) end select else call msgbox(err.description, vbCritical, CAPTION) end if ' Close and remove the Connection object from memory iADOObj.Close else call msgbox("Failed to create ADODB.Connection object.", vbCritical, CAPTION) end if Set iADOObj = Nothing else call msgbox (DB_NAME & " - not found.", vbCritical, CAPTION) end if set FSO = nothing End Sub '------------------------------------------------------------------------------- ' Find and display a record in the database (e.g James). '------------------------------------------------------------------------------- Sub FindRecord(byref iADOObj) dim iRST iRecordFound = FALSE ' create a Recordset object from a SQL string iSQLString = "SELECT * FROM Employee WHERE Name='" & InputBox("Enter the name you want to find") & "'" Set iRST = iADOObj.Execute(iSQLString) Do Until (iRST.EOF) call msgbox("Name: " & iRST("Name") & HRT & "ID: " & iRST("ID"), vbInformation, CAPTION) iRST.MoveNext iRecordFound = TRUE Loop if not iRecordFound then call msgbox("No records found.", vbInformation, CAPTION) end if ' close and remove the Recordset object from memory iRST.Close Set iRST = Nothing end sub '------------------------------------------------------------------------------- ' Display all records in the database '------------------------------------------------------------------------------- Sub DisplayAllRecords(byref iADOObj) dim iRST ' create a Recordset object from a SQL string iSQLString = "SELECT * FROM Employee" Set iRST = iADOObj.Execute(iSQLString) ' retrieve all the data within the Recordset object call msgbox("Displaying all records ...", vbInformation, CAPTION) Do Until (iRST.EOF) call msgbox("Name: " & iRST("Name") & HRT & "ID: " & iRST("ID"), vbInformation, CAPTION) iRST.MoveNext Loop call msgbox("End of data.", vbInformation, CAPTION) ' close and remove the Recordset object from memory iRST.Close Set iRST = Nothing end sub '------------------------------------------------------------------------------- ' Add a new record into database '------------------------------------------------------------------------------- Sub AddNewRecord(byref iADOObj) dim rs Set rs = CreateObject("ADODB.Recordset") ' Declare variable to hold the _Recordset Object reference. ' Open Table1 in the database. Call rs.Open("Employee", iADOObj, 2, 3) ' Add new record in the Table1. Call rs.AddNew rs("ID") = InputBox("Enter ID") rs("Name") = InputBox("Enter Name") Call rs.Update call msgbox("Record added.", vbInformation, CAPTION) set rs = nothing end sub '------------------------------------------------------------------------------- ' Store existing records in a list box '------------------------------------------------------------------------------- sub StoreExistingRecordsDialog(byref iADOObj, byref iUpdateDlg, byref iListBox) dim iRST set iUpdateDlg = Utilities.NewControlBoxDialog with iUpdateDlg .Caption = CAPTION .Title = "Exsiting records" .Description = HRT & "Select an existing record to update" end with set iListBox = iUpdateDlg.AddListBoxControl iListBox.Caption = "Records:" iSQLString = "SELECT * FROM Employee" Set iRST = iADOObj.Execute(iSQLString) Do Until (iRST.EOF) iListBox.items.add(iRST("Name")) iRST.MoveNext Loop iRST.Close Set iRST = Nothing end sub '------------------------------------------------------------------------------- ' New records details dialog '------------------------------------------------------------------------------- sub UpdateExistingRecordDialog(byref iADOObj, aExtName) set iDlg = Utilities.NewControlBoxDialog with iDlg .Caption = CAPTION .Title = "Update record" .Description = HRT & "Existing record: " & aExtName end with set iNewName = iDlg.AddEditControl iNewName.Caption = "Enter new name:" set iNewID = iDlg.AddEditControl iNewID.Caption = "Enter new ID:" ' If we press the Ol button to update if (iDlg.execute = Btn1) then if (iNewID.Text <> "") and (iNewName.Text <> "") then iSQLUpdate = "UPDATE Employee SET ID ='" & iNewID.Text & "', Name = '" & iNewName.Text & "' WHERE Name ='" & aExtName & "'" Set iRST = iADOObj.Execute(iSQLUpdate) call msgbox ("record updated.", vbInformation, CAPTION) else call msgbox("Empty fields not accepted.", vbInformation, CAPTION) call UpdateExistingRecordDialog(iADOObj, aExtName) end if end if end sub '------------------------------------------------------------------------------- ' Edit record '------------------------------------------------------------------------------- sub EditRecord(byref iADOObj) dim iUpdateDlg dim iListBox cExit = 999 cEditRecord = 201 cDisplayAllRecords = 101 Cmd = cDisplayAllRecords call StoreExistingRecordsDialog(iADOObj, iUpdateDlg, iListBox) do while Cmd <> cExit if Cmd = cDisplayAllRecords then select case iUpdateDlg.execute case Btn1 Cmd = cEditRecord case else Cmd = cExit end select end if if Cmd = cEditRecord then if iListBox.Selected <> "" then call UpdateExistingRecordDialog(iADOObj, iListBox.Selected) Cmd = cExit else call msgbox ("Select a record to update.", vbInformation, CAPTION) Cmd = cDisplayAllRecords end if end if loop end sub '------------------------------------------------------------------------------- ' Intro Dialog '------------------------------------------------------------------------------- Function IntroDlg set iDlg = Utilities.NewControlBoxDialog with iDlg .Caption = CAPTION .Height = 250 .Title = "Database Management" .Button1Caption = "&Add" .Button3Visible = True .Button3Caption = "&Display All" .Button4Visible = True .Button4Caption = "&Find Record" .Button5Visible = TRUE .Button5Caption = "&Update" .Description = HRT & "This applet will allow you to add a new record, display " &_ "all records or find a record in the database." & HRT & HRT &_ "Database: " & DB_NAME end with End FunctionYou need to have database access services installed on your PC regardless of whether you are using Formativ or any other development tool. The only example I have is where we use Microsoft’s ADO (Active Data Objects) to access a JET (Access) database:
sub UpdateAcceptedSupportIssue(iMsg, iEvent, iEngineer) dim iADOObj dim iRST ' create a new instance of an ADO Connection object set iADOObj = CreateObject("ADODB.Connection") ' Did we get a handle to the ADO connection if not isobject(iADOObj) then call msgbox("Failed to create ADODB.Connection object.", vbCritical, "Support Example") else ' open the test data source with the Connection object iConnnectString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & SUPPORT_DATABASE iADOObj.Open iConnnectString ' Are we connected to the database? if err.number = 0 then ' Connected to the database - what do we want to do? We currently support ' accepting a new support incident, and completing (closing) an incident. select case iEvent ' Accept - Add a new record the SQL database case "GW#C#ACCEPT" iSQLString = "INSERT INTO Support(Incident,RequestedBy,Subject,ResponsibleEngineer,RequestedDate) VALUES ('"& iMsg.MessageID &"','"& iMsg.FromText& "','"& iMsg.Subject&"','" & iEngineer & "','"&SQLDate(Date)&"')" iADOObj.Execute(iSQLString) ' Complete (close) - Update the existing record in the SQL database case "GW#C#COMPLETE" iSQLString = "UPDATE Support SET CompletedDate='" & SQLDate(Date + 5) & "' WHERE Incident='" & iMsg.MessageID &"'" iADOObj.Execute(iSQLString) end select ' close and remove the Recordset object from memory iRST.Close set iRST = Nothing else msgbox err.description, vbCritical, IDS_CAPTION end if ' Close and remove the Connection object from memory iADOObj.Close end if set iADOObj = Nothing end subYou can learn more about ADO from this link to Microsoft’s web site.
I hope this helps.
Advansys Support
The easiest way to install Runtime so that ‘master’ installation settings are written into the HKEY_LOCAL_MACHINE hive of the registry is to use a config.ini file. A config.ini file lets you specify most of the possible installation options that will be used by the installer. If you don’t use a config.ini, most of the LDAP settings need to configured manually via the Formativ Control Panel applet. The syntax of the config.ini file is documented in the Distribution Kit documentation, which is available from http://www.advansyscorp.com/formativ_distribution_kit.htm.
Unfortunately, there is currently no way to define a default context without also defining a default username. (The context and username are stored as a single entity in the registry). The closest to a default context you can currently get would be to define the actual context you wish to use, plus a placeholder username value the user needs to replace the very first time they log in.
Here’s the contents of a sample config.ini file you could use:
[Protocol] Usage=2 Override=1 [LDAP] Port=389 SSL Port=636 Use SSL=0 Server=ldapserver.yourorg.com Username=cn=<UserName>,o=formativ Server Requires Logon=1 Save Password=1 Allow Anon Login=0 Automatic Login=1 Save Username and Password Feature Enabled=1 [Configuration] Create Settings for All Users=1
To install Runtime using these settings, execute:
formativruntime.exe /s /i-config.ini
from the command line. This will install Runtime silently using the settings described above. The first time a user starts GroupWise, they will have to replace the displayed
with their real username, and supply a password. The context will already be in place. Because the entry ‘Automatic Login=1’ is present, subsequent logins will be attempted automatically using the details that were automatically saved into the users GroupWise account. If you wish to configure Formativ with LDAP so that no LDAP login screen is user displayed, you would need to create a new LDAP that every user logged in as. You would use the following config.ini commands:
Username=<full DN of the common user> Automatic Login=1 Default Password=<password of the common user> Use Default Username=1 Use Default Password=1
The use of all the available commands are documented in the Distribution Kit.
Advansys Support
The snapshot most likely does not include some of the components used by the Formativ registration security system. I would recommend you use the AXT file supplied with the Formativ Distribution Kit as a basis for a ZEN rollout.
Please let me know if you require any further assistance.
Advansys Support
We currently don’t have an applet written that does this. The applet in question would need to login to each users account and query the account owners proxy right details. GroupWise security dictates that the applet would need to:
a) Know every users password in order to login to their account, or
b) Every user would need to grant proxy access to the central account from which you ran you applet, or
c) If you were using GroupWise 6.5, you could create a ‘Trusted Applet’, which could access each users account without needing to know every user’s password. This is generally the most practical approach.
I’ve added this request to out solutions request database. We draw upon this database to create our free Cool Solutions applets.
Kind regards,
Advansys Support
I’ll create a similiar setup here and report back my findings as soon as possible.
Advansys Support
Thanks for the feedback. I’ll add this to our enhancement database.
Advansys Support
Unfortunately some controls do not expose the font property – the checkbox is one of them. All controls will have the font property (and many others) exposed in the next release of Formativ. No release dates are currently available.
In the meantime, here’s some sample code that shows how to use the font property with a panel control.
Advansys Support
dim iDlg dim iCkCtl dim iPnCtl set iDlg = Utilities.NewControlBoxDialog ' Check box control set iCkCtl = iDlg.AddCheckBoxControl ' Panel control set iPnCtl = iDlg.AddPanelControl with iPnCtl .Font.Style = ffsBold .Font.Color = fclMaroon .Alignment = ftaLeftJustify .Left = 20 .AutoSpace = FALSE .SpaceAbove = -15 .Caption = "Show All" end with ' Execute the dialog iDlg.execute set iPnCtl = nothing set iCkCtl = nothing set iDlg = nothingUnfortunately no. GroupWise security stops you from ‘spoofing’ the from address. You can change the ‘FromText’ property, but this doesn’t change the ‘sent from’ email address. Here’s some sample code:
Sub Main(Client, GWEvent) dim iDlg dim iAddress dim iChkBoxCtl set iDlg = Utilities.NewControlBoxDialog iDlg.Caption = IDS_CAPTION iDlg.Title = "Setup From Address" iDlg.Description = vbcrlf & "This applet will allow you to change the 'From' email address when sending a message." set iChkBoxCtl = iDlg.AddCheckListControl iChkBoxCtl.caption = "Select a from address:" iChkBoxCtl.Options = fchClick ' =============================================================================== ' Add the from addresses in here. call iChkBoxCtl.AddItem(GroupWise.account.owner.displayname, TRUE) call iChkBoxCtl.AddItem("Test 1", FALSE) call iChkBoxCtl.AddItem("Test 2", FALSE) call iChkBoxCtl.AddItem("Test 3", FALSE) ' =============================================================================== ' Is the [Ok] button pressed? if (iDlg.execute = btn1) then iAddress = replace(iChkBoxCtl.CheckedItems.CommaText, """", "") if (len(iAddress) > 0) then call GroupWise.FocusSet(fcsFrom, "") GroupWise.TypeText(iAddress) end if end if set iChkBoxCtl = nothing set iDlg = nothing End SubAdvansys Support
No problems – thanks for the update.
Advansys Support
As Admin is a superset of Developer (i.e: they both let you develop and execute applets, but Admin included eDirectory management support), the original design didn’t consider the possibility that a user would want to have both builds installed on the same machine.
How important is it to for you to be able to install both Admin and Developer builds on the same computer?
Advansys Support
The following sample code saves the current draft message and cancels the current message view. Depending on the version of GroupWise being used, you may see the “Do you want to save your changes?” dialog. This has been fixed in GW6.02+:
' Save the message GroupWise.ItemSaveMessageDlg ' Disables the "Do you want to save your changes?" dialog when closing the view. groupwise.EnvClearChangedFlag() ' Cancel the current view. groupwise.cancel()
I hope this helps.
Advansys Support
I would suggest you upgrade (for free) to 1.6. Version 1.6 uses the Windows system defined location for all personal files (including the mirror) to ensure a) multiple user machines are supported, and b) conflicts with write access to directories under the ‘Program Files’ directory are avoided.
You can obtain a free 1.6 upgrade from the downloads page.
Advansys Support
Do you mean you installed Formativ Admin and Developer on the same machine, and then could not see the eDirectory Library you created? Developer does not ‘see’ eDirectory libraries as such – only Admin. Admin and Developer cannot co-exist on the same machine. The most recently installed product will overwrite the previous one.
Advansys Support
-
AuthorReplies