/ Forums / Advansys Formativ / Formativ Creator / ItemAddMimeXField GW 8.0.2

  • Creator
    Topic
  • #3617
    atrapp
    Participant

      Hi there,

      I’m looking for an example how to use ItemAddMimeXField token in Formativ. Can anybody help me, please?

      Thanks and best wishes from Germany! Smile

    • Author
      Replies
    • #5650
      Support 1
      Participant

        Thanks for your enquiry.

        While I have not used this token previously, I think the following code sample might be helpful to get you started. It assumes you have a GroupWise message view open and that it is the active window. Therefore, if you create a Formativ applet based on this code, you will need to integrate the applet so an icon for it appears on the message view.

          iMsgID = GroupWise.ItemMessageIDFromView
          call GroupWise.ItemAddMimeXField(iMsgID, "X-Kingdom", "Animalia")
          call GroupWise.ItemAddMimeXField(iMsgID, "X-Phylum", "Arthropoda")
          call GroupWise.ItemAddMimeXField(iMsgID, "X-Class", "Insecta")
          call GroupWise.ItemAddMimeXField(iMsgID, "X-Order", "Lepidoptera")
        

        The X-fields in this sample represent the butterfly’s scientific classification.

        I hope this helps.

        Regards,
        Advansys Support

        #5648
        atrapp
        Participant

          Thanks for your quick response,

          this is exactly what I’m trying, but unfortunately i get the following error:

          Object doesn’t support this property or method: ‘Groupwise.ItemAddMimeXField’ at line 14, column 6

          Is it possible that this token is not implemented in Formativ yet? I can´t find anything about it in the Language Guide too.

          Here is my Code:

          Dim oMsgItem
          Set oMsgItem = Groupwise.ComposingItem
          Dim iMsgID
          if oMsgItem is Nothing then
          call Groupwise.NewMail
          iMsgID = Groupwise.ItemMessageIDfromView
          call GroupWise.ItemAddMimeXField(iMsgID, “X-WDRCrypt”, “yes”)
          else
          iMsgID = Groupwise.ItemMessageIDfromView
          call GroupWise.ItemAddMimeXField(iMsgID, “X-WDRCrypt”, “yes”)
          end if
          set oMsgItem = Nothing

          #5649
          Support 1
          Participant

            Thank you for the clarification. The Token API online documentation indicates that ItemAddMimeXField() was added in GroupWise 8.0. I would say you are correct: this new token probably is not yet supported in Formativ. You can use the following workaround:

            Dim oMsgItem
            Set oMsgItem = Groupwise.ComposingItem
            if oMsgItem is Nothing then
              call Groupwise.NewMail
            end if
            set oMsgItem = Nothing
            Dim iMsgID
            iMsgID = Groupwise.ItemMessageIDfromView
            Dim iSyntax
            iSyntax = "ItemAddMimeXField(""" & iMsgID & """, ""X-WDRCrypt"", ""yes"")"
            MsgBox GroupWise.ThrowToken(iSyntax, iReturnVal)
            

            I hope this helps.

            Kind regards,
            Advansys Support

            #10130
            MastMartin
            Participant

              I would like to ask, if Formativ now 6 years later support the ItemAddMimeXField-method?

              Kind regards

              Martin

              #10131
              Support 2
              Moderator

                Hi Martin,

                ItemAddMimeField was not added to the language as a separate call. This is primarily because Formativ inherently supports the generic “GroupWise.ThrowToken” function, which enables any GroupWise token to be executed, regardless whether it is overtly exposed as a unique command within the Formativ language.

                ItemAddMimeField is not a command we use in our solutions nor have we had any requests about it since our last support post above in 2011.

                Does the work-around listed above not work in your case?

                Kind Regards,

                Advansys Support

              Viewing 5 replies - 1 through 5 (of 5 total)

              Tagged: ,

              • You must be logged in to reply to this topic.