Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

comma separated values in current selections

Hi,

I want to retrieve current selections using QMS API.

Using C#,

  if I use this, axQlikOCX1.ActiveDocument.GetCurrentSelections(). it works fine..

but this, axQlikOCX1.ActiveDocument.GetCurrentSelections(',', '=', ';') gives error!

Is there any way I can configure the character which separates the selected values?

Thanks and Regards,

Anju

1 Solution

Accepted Solutions
Not applicable
Author

Hi All,

I was able to find a solution to the problem mentioned above.

Please see the below link:

               http://community.qlik.com/message/316500#316500

Regards,

Anju

View solution in original post

4 Replies
danielrozental
Master II
Master II

BTW this isn't the QMS API, it's just the OCX component.

Here's the proper way to use the GetCurrentSelecctions method, this is vbs code.

set x = ActiveDocument.GetCurrentSelections

s = x.Selections

v = x.VarId

for i = lbound(s) to ubound(s)

    msgbox v(i)&" = "&s(i)

next

Not applicable
Author

Hi Daniel,

Thanks for replying. We are using something similar to this.

                IReturn5 selections = axQlikOCX1.ActiveDocument.GetCurrentSelections();

                IList selectionValues = (IList)selections.Selections;

                IList selectedFields = (IList)selections.VarId;

But say I have partner names....if the first entry is BT,UK  and second is ATT..then I get three values in selectionValues since the delimiter is comma. So, is there any way I can specify what the delimiter should be?

Thanks,

Anju

Not applicable
Author

Hi,

The below function works fine in a text object

=GetCurrentSelections(' | ', ': ', '##')

Is there any way I can read the display text of the text object via QMSAPI? That would do the trick for me.

What does the function GetMessageBoxTexts() do? Where do I get a description of these functions?

Thanks,

Anju

Not applicable
Author

Hi All,

I was able to find a solution to the problem mentioned above.

Please see the below link:

               http://community.qlik.com/message/316500#316500

Regards,

Anju