cancel
Showing results for 
Search instead for 
Did you mean: 

ShowObjectPicker and Glossary objects

former_member217396
Participant
0 Kudos

Hi all,

We have a problem applying the Method ShowObjectPicker to terms grouped in categories in the glossary model.

We would like to make the terms with a certain status (Candidate) available for selection. We've written the following script:

Dim gl, sel, selectedterm

Set gl = ActiveGlossary

Set sel = gl.CreateSelection

For Each cat In gl.Categories

   For Each ter In cat.Terms

      If ter.Status = "Candidate" Then

         sel.Objects.Add ter

      End If

   Next

Next

Set selectedterm = sel.ShowObjectPicker

sel.Delete

The problem is, that the object picker doesn't show any terms (and we've verified that the selection contains elements). This problem seems to occur if the terms are located in categories, not if the terms are located directly under the model. The method ShowObjMultiSelection does not seem to have this problem, but we'd like to select only one element. We've also tried setting the arguments of the object picker, but as soon as you do that, it ignores the object selection. Could this be a bug of the object picker? Or is there something we have missed?


BR,

Rafal

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200945
Contributor
0 Kudos

When you create a term in a category, the entry will be added in Terms

automatically. So the following code works for me:

set gl = ActiveGlossary

set sel =gl.CreateSelection

for each t in gl.Terms

   'in my case, it shows status is upper case

   output t.status

   if t.status = "CANDIDATE" then

       sel.Objects.add t

   end if

next

set selectedterm=sel.ShowObjectPicker()

Former Member
0 Kudos

Dear Phillip,

thanks a lot for your reply. But your code only works for me for those terms that do not belong to any category. Otherwise these terms are not shown in the ObjectPicker.

Best regards,

Simone

former_member200945
Contributor
0 Kudos

You are correct.

My original testcase happened to have many terms in root folder.

So I think this is a bug.

Will open a case with engineering.

Former Member
0 Kudos

Thanks a lot!