Forum Replies Created

Viewing 15 replies - 16 through 30 (of 40 total)
  • Author
    Replies
  • in reply to: Appointment duration from DateTime controls #7902
    dgerisch
    Participant

      Sorry about the late reply – but yes, this was the info I needed. Thank you. 🙂

      in reply to: Appointment duration from DateTime controls #7907
      dgerisch
      Participant

        So the good news is that this code runs without error:

        isoTimePeriodBegin = objIniFile.ReadString(“Section”, “advTimePeriodBegin”, “”)
        isoTimePeriodEnd = objIniFile.ReadString(“Section”, “advTimePeriodEnd”, “”)

        datetimeTimePeriodBegin = Utilities.ISOToDate(isoTimePeriodBegin)
        datetimeTimePeriodEnd = Utilities.ISOToDate(isoTimePeriodEnd)

        NewTimeRecord.DatePicker.Date = datetimeTimePeriodEnd
        NewTimeRecord.TimeBeginPicker.Date = datetimeTimePeriodBegin
        NewTimeRecord.TimeEndPicker.Date = datetimeTimePeriodEnd

        If NewTimeRecord.ShowModal() = mrOK Then

        isoTimePeriodEnd = Utilities.DateToIso(NewTimeRecord.TimeEndPicker.Date)
        isoTimePeriodBegin = objIniFile.WriteString(“Section”, “advTimePeriodBegin”, isoTimePeriodEnd)

        End If

        The bad news is that the form displays the time field from when the form was defined – not from datetimeTimePeriodBegin or datetimeTimePeriodEnd.

        in reply to: Appointment duration from DateTime controls #7900
        dgerisch
        Participant

          Hmmm. I still have a problem. I have a form I created using the visual forms designer named “NewTimeRecord”

          iTimePeriodBegin = utilities.DateToISO(now)
          iTimePeriodEnd = utilities.DateToISO(now)

          NewTimeRecord.DatePicker.Date = iTimePeriodEnd
          NewTimeRecord.TimeBeginPicker.Date = iTimePeriodBegin
          NewTimeRecord.TimeEndPicker.Date = iTimePeriodEnd

          but the applet crashes on the third line, “NewTimeRecord.DatePicker.Date = iTimePeriodEnd”

          EVariantTypeCastError
          <path to>.vbf
          Could not convert variant of type (OleStr) into type (Double) at line 17, column 5

          in reply to: Appointment duration from DateTime controls #7904
          dgerisch
          Participant

            This Formativ applet that I’m building is essentially a one-button click to add a blog entry to a person’s calendar. It’s a little more than this, but at it’s core, this is it.

            What I’m doing, is running a (small) program on the PC, that keeps track of the “last update” time. So every six minutes (although the user can specify thier own cycle duration), this program updates an .ini file on the PC.

            This last update time is used by the Formativ applet as the (proposed) appointment.enddate

            When the applet finishes, it updates the same .ini file – putting the appointment.enddate into the entry for the next cycle’s appointment.startdate

            So I want to pull .startdate and .enddate from an .ini file, present them to the user (let the user modify the entries to his or her heart’s content), post the calendar item, and then write out the last .enddate to the .ini file to be used as the next .startdate

            The program on the PC continues to run, waiting for time to pass, for the duration of the cycle. When the current cycle is over, it updates the .ini file again with the new appointment.enddate

            Thus, every time you click the button to launch the Formativ applet, you get to add a posted appointment to your calendar – that picks up where the last entry left off. Of course, there are radio buttons that let you skip the appointment text (but still update the time), or specify that this time went toward a particular something. But those are user interface pieces I want to deal with later.

            It is true that I do not need the .ini file entries to be in human readable format. It is a little nicer from a debugging stand point – but that is a minor issue.

            Does this explain the goal I am trying to reach?

            Thanks!

            in reply to: Appointment duration from DateTime controls #7911
            dgerisch
            Participant

              It might be easier for me to compute the floating point number for DateTimePicker.Date than to parse the human readable string. (I’m not really a VBScript programmer). Is that number somthing like some-number-of-hours-since 1990?

              The other possibility is just that I picked the wrong object type from the visual forms designer palette. I want the user to be able to use the equivalent of the classic Dlg.AddDateTimeControl

              If I really had to, I could make my program (that is supplying me the time) output it in six different chunks like that so I wouldn’t have a big parsing job in front of me. But as long as I’m adapting that program, it might make sense to export the floating point number directly and just hand the dialog object the data it wants natively.

              Thanks!

              in reply to: Appointment duration from DateTime controls #7914
              dgerisch
              Participant

                So I like the idea of using the visual forms designer, from some of the sample applications, it looks like I’m going to be able to get the fine-grained control I want. However, I’ve run into a slightly different problem now. With the old dialog, I was picking up date+times in a human-readable format, and using that for iTimePeriodBegin and iTimePeriodEnd.

                Now that I’m using the visual forms designer, I get errors about an OLE something and not a valid long number. Doing an export of the form to a file shows that the .Date data needs to be in the form of 39386.4694906366 (instead of 10/31/2007 11:54:00)

                Sure enough, plugging that real number into iTimePeriodBegin and iTimePeriodEnd lets the dialog display.

                What is the formula for computing this date+time number?

                -Or-

                Can I make the object DatePicker: TDateTimePicker be happy with a human readable date?

                Thanks!

                in reply to: GroupWise Account CategoryDefinitions Add #7895
                dgerisch
                Participant

                  The plot thickens. After exiting and starting GroupWise again, I did get two categories added. The third line in the file has commas in it though.

                  And now, after removing the lines in the file with commas, the whole thing does import, just like I want.

                  in reply to: GroupWise Account CategoryDefinitions Add #7898
                  dgerisch
                  Participant

                    I’m getting an error, and I don’t know why. The error I get is:

                    CategoryDefinition.Object
                    An invalid argument was passed in the function call. at line 19, column 5

                    Sub Main(Client, GWEvent)

                    Const CATEGORY_CODE_FILE = “CategoryList.txt”
                    DEFAULTFOLDER = Utilities.GetDataDirectory

                    iFilePath = DEFAULTFOLDER & CATEGORY_CODE_FILE
                    set iCodeList = Utilities.StringList
                    set iFSO = CreateObject(“Scripting.FileSystemObject”)

                    If iFSO.FileExists(iFilePath) then
                    iCodeList.LoadFromFile(iFilePath)
                    End if

                    For x = 0 to iCodeList.count – 1
                    GroupWise.Account.CategoryDefinitions.Add(iCodeList.strings(x))
                    Next

                    Set iCodeList = Nothing

                    End Sub

                    Line 19 is the GroupWise.Account.CategoryDefinitions.Add(iCodeList.strings(x)) line.

                    I know for certain that the file exists, because if I put a msgbox inside the If iFSO.FileExists(iFilePath) block, I do get a pop up that tells me this test was met.

                    I’m guessing that there is something different between a bunch of iCodeList.Add(“”) statements and iCodeList.LoadFromFile(), but I don’t know what it is.

                    Thank you for any pointers you can send me.

                    in reply to: Appointment duration from DateTime controls #7908
                    dgerisch
                    Participant

                      That was exactly what I needed. Thank you! Smile

                      in reply to: Can I automate an action from a sent message? #7867
                      dgerisch
                      Participant

                        Thank you. Doing an initial look, it appears that I would need to build an applet, distribute it to every user, and that applet would provide the user interface and processing – correct?

                        The other way to do it would be to send a message that invokes the Formativ portal and have the web server do all the work – no?

                        This particular application is pretty much a one-shot enrollment / op-in process (and offered onesy-twosy at that). Distributing an applet to 2,200+ machines seems a little heavy for a one shot deal. I haven’t done any applets that deliver a message and pop up a dialog, so I expect that might surprise some of my users. Of course, redirecting them to the portal might surprise them too….

                        in reply to: Current item BodyText – can I access the HTML version? #7850
                        dgerisch
                        Participant

                          Thank you very much. 🙂

                          in reply to: duplication of objects once set in eDir #5304
                          dgerisch
                          Participant

                            Thank you very much. 🙂

                            in reply to: duplication of objects once set in eDir #5303
                            dgerisch
                            Participant

                              I’m trying to find the registry key which identifies the local Applet path, but it is eluding me. Where should I look?

                              Thanks,

                              David Gerisch

                              in reply to: How can I move an attachment into a GW folder? #7839
                              dgerisch
                              Participant

                                Markus out in the Novell Object API Forum pointed out that I could clone the attachment as a new message, and move that to the folder I want. So I used the code you wrote, added a little bit, and it works. 🙂

                                
                                  ' Move the attach message to a destination folder (WORKS)
                                  if (oAttachment.ObjType = 2) then
                                    msgbox oAttachment.message.messageid
                                    set oAttachmentClone = oAttachment.message.Clone
                                    call oSourceFolder.messages.move(oAttachmentClone.messageid, oDestinationFolder.messages)
                                  end if
                                
                                
                                in reply to: Multiple selected messages #7847
                                dgerisch
                                Participant

                                  Never mind – I found it in the Developer’s Guide, Working with the GroupWise Message Store, Accessing Messages via the Client, Accessing Multiple Selected Messages.

                                Viewing 15 replies - 16 through 30 (of 40 total)