Set a listbox field using keyword synonyms

Dear All,

I have defined a listbox field with “Allow keyword synonyms” and “Refresh choices on document refresh” selected.

Multiple values are allowed for this field.

My choices and synonyms are:

“First Choice” | 1

“Second Choice” |2

“Third choice” | 3

“Fourth choice” | 4

My question is : in Lotusscript, how to set this field using the keywords 1, 2, 3 and 4?

I have tested the following but it does not work:

CurrentUidoc.FieldSetText(“MyField”, “1:2:3”)

Then, I have tested the following but it does not work:

Call CurrentUiDoc.Document.AppendItemValue(“MyField”;“1”)

Call CurrentUiDoc.Document.AppendItemValue(“MyField”;“2”)

Call CurrentUiDoc.Document.Save(True, False, True)

Call CurrentUiDoc.Refresh

Do you have any suggestions? I think I have tested everything…

Thanks in advance for your support,

Mikaël Donini, Arkadin France.

Subject: set a listbox field using keyword synonyms

Mikael,

Have you tried the following code:

CurrentUidoc.FieldSetText(“MyField”, “1; 2; 3”)

Remember a field that has multiple values identified the seperator and I believe by default it is comma (,) and semi-colon (:wink: and newline.

I would check your field to see what the seperators are and chose one of those characters.

HTH