It's all about the answers!

Ask a question

How to Query on RTC multi select checkbox

Kaushambi Singh (371310379) | asked Nov 29 '13, 6:12 a.m.

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

2 answers

permanent link
Piotr Aniola (3.7k11738) | answered Nov 29 '13, 6:55 a.m.
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?

permanent link
sam detweiler (12.5k6195201) | answered Nov 29 '13, 8:08 a.m.
edited Nov 29 '13, 8:09 a.m.
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
                                    for (ILiteral literal : enumerationLiterals)
                                        if (literal.getIdentifier2()
                                            .println("\t\t\t\t --> attribute id="
                                                    + ia.getIdentifier()
                                                    + ", type"
                                                    + "="
                                                    + ia.getAttributeType()
                                                    + " literal="
                                                    + literal
                                                    + " literal name="
                                                    + literal.getName());

Your answer

Register or 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.