• Creator
    Topic
  • #3882
    valveamp
    Participant

      I would like to extend the capabilities of the example “Create GroupWise Filter.vbf” in order to select the “Advansys Category” as a filter option. I have been able to add it to the options list, but am stuck on what parameter I need to call, and where the call is listed.

      could you help?
      many thanks, Simon

    • Author
      Replies
    • #6493
      Support 2
      Moderator

        The following code snippet should assist. Please let us know if you have any other questions.


        dim hFilter
        ' Clear any previous filter
        Call GroupWise.FilterClear
        hFilter = GroupWise.FilterCreate(fttEmpty, TRUE)
        Call GroupWise.FilterSetText(hFilter, 331, "Test", matSubText, "Advansys Category","")
        ' Apply current filter
        Call GroupWise.FilterApply(hFilter,fatItemList,"")

        Regards,

        Advansys Support

        #6490
        valveamp
        Participant

          many thanks for that, I have got it working if I manually put a Category name in place of the “Test” parameter, but I cannot work out how to capture the Category name from the selected message.

          I have looked through the Category Applet and tried several different things, however I have been unable to make it work

          any help would be greeted with thanks

          Simon

          #6494
          Support 2
          Moderator

            The second snippet of code is what you are probably after. The first one is included for good measure.


            1. Create a filter to return messages which have any value in the custom field 'Advansys Category'.

            Call GroupWise.FilterSetText(hFilter, 331, "**", matSubText, "Advansys Category","")


            2. Read the 'Advansys Category' custom field value from a selected message.

            on error resume next
            Set Msg = Client.ClientState.CommandMessage
            set FieldOut = Msg.Fields.Item("Advansys Category", fgwString)
            msgbox (FieldOut.Value)
            set FieldOut = nothing
            set Msg = nothing

            We hope this helps. Please let us know if you need further assistance.

            Regards,

            Advansys Support

            #6491
            valveamp
            Participant

              many thanks for the help, I have now got it working. I am aware that a message can be placed in multiple categories, and at the moment I am not specifically dealing with that, but for single categories it works fine.

              cheers
              Simon

              #6492
              Support 2
              Moderator

                Good news.

                Regards,

                Advansys Support

              Viewing 5 replies - 1 through 5 (of 5 total)
              • You must be logged in to reply to this topic.