Agile Central - Queries: Query a MultiSelect drop-down custom field that has no value

book

Article ID: 74852

calendar_today

Updated On:

Products

CA OPS/MVS Event Management & Automation CA Agile Central On Premise (Rally) CA Agile Central SaaS (Rally)

Issue/Introduction



Normally multi-select drop-down fields have at least one value selected. It may be worthwhile to know how to query if a multi-valued drop-down field has no value selected. This is allowed unless that field is mandatory. This applies to both out-of-box as well as custom fields of that type.

Environment

Release:
Component: ACSAAS

Resolution

In this example we created a custom field named: "c_SagiTestMultiValued". We associated it with the Defect artifact. We have a many defects in our project and we'd like to query only those defect without any selected value for this attribute.

For the Defect artifact look at the fields:

<Please see attached file for image>

User-added image

And find that multi-valued attribute:

<Please see attached file for image>

User-added image

You can view/edit the details and see the list of values it may have:

<Please see attached file for image>

User-added image

You may have projects in place that already use our WSAPI or SDK. However, one of the easier ways to try out query strings
and confirm they work is our WSAPI online doc. You bring that up and click on the artifact that has this attribute (in this case Defect). Then, scroll down the list of attributes to find it.

You can see the actual name of this attribute is "c_SagiTestMultiValued" (notice the prefix 'c_' which is used for custom fields). This is the name you must use in your query string. You can not use the name we saw earlier in the list of fields or the display name,

Notice the Query Expression Operators in this table, they indicate the operators you can use when querying this attribute. As you can see the "=" operator is not applicable for a multi-valued attribute, and hence you shall need to use "contains": 

<Please see attached file for image>

User-added image

Back on the Defect artifact enter the Query String, in this case it is: (c_SagiTestMultiVaued contains "")  
This would be the query to use to retrieve the Defects without values in this attribute:

<Please see attached file for image>

User-added image

Clicking the 'Query' button you will result in this pop-up window where you can see the total number of Defects matching this query, in this example that number is 6. Lower you can find more information about these defects:

<Please see attached file for image>

User-added image

Attachments

1558694003778000074852_sktwi1f5rjvs16mgj.png get_app
1558694001984000074852_sktwi1f5rjvs16mgi.png get_app
1558694000294000074852_sktwi1f5rjvs16mgh.png get_app
1558693998424000074852_sktwi1f5rjvs16mgg.png get_app
1558693996731000074852_sktwi1f5rjvs16mgf.png get_app
1558693994707000074852_sktwi1f5rjvs16mge.png get_app
1558618362658000074852_sktwi9tkjvsehwwq.png get_app
1558618360727000074852_sktwi9tkjvsehwwp.png get_app
1558618358727000074852_sktwi9tkjvsehwwo.png get_app
1558618356742000074852_sktwi9tkjvsehwwn.png get_app
1558618354779000074852_sktwi9tkjvsehwwm.png get_app
1558618352970000074852_sktwi9tkjvsehwwl.png get_app