Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to Query on RTC multi select checkbox

I have an attribute named "Systems" which is a multiselect check box having values like "Blue, Red, Green".

I want to query on this multiselect checkbox but this returns the literals of the values like subsystem.literal.l2,subsystem.literal.l3 and not the actual value (Blue, Red...). How can we query on a multiselect checkbox so that it returns the values ? I am using RTC 3.0.1.1

0 votes



2 answers

Permanent link
I am not able to reproduce this on RTC 4.0.x.
There has been a lot of work done since version 3 regarding support of custom enumerations. Can you try on a newer version of RTC?

0 votes


Permanent link
had to use an answer for the length of this text

to get the values of the literals, you will have to resolve each one.
the model changed for the new multi type in 4.x

from my example

List<iliteral> enumerationLiterals = enumeration
                                            .getEnumerationLiterals();
                                    for (ILiteral literal : enumerationLiterals)
                                    {
                                        if (literal.getIdentifier2()
                                                .getStringIdentifier()
                                                .equalsIgnoreCase(iaval[1]))
                                        {
                                            System.out
                                            .println("\t\t\t\t --> attribute id="
                                                    + ia.getIdentifier()
                                                    + ", type"
                                                    + "="
                                                    + ia.getAttributeType()
                                                    + " literal="
                                                    + literal
                                                    .getIdentifier2()
                                                    .getStringIdentifier()
                                                    + " literal name="
                                                    + literal.getName());
                                            break;
                                        }
                                    }

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Nov 29 '13, 6:12 a.m.

Question was seen: 4,128 times

Last updated: Nov 29 '13, 8:09 a.m.

Confirmation Cancel Confirm