It's all about the answers!

Ask a question

Can we bind parameter(s) to RTC Query?


Sagar Baviskar (1145) | asked Apr 01 '15, 1:32 a.m.
edited Apr 02 '15, 3:33 a.m. by Ralph Schoon (63.3k33646)
Hi All,

I have RTC Query. Query retrieves data based on UserId/Email Address passed to it. right now I have hardcoded the UserId/Email Address.

can it possible to pass UserId/Email Adress by accessing query from java code.

please suggest.

Regards

One answer



permanent link
Ralph Schoon (63.3k33646) | answered Apr 02 '15, 4:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I had a quick look into the API and I easily found these methods:

        IQueryDescriptor.hasParameterVariables();
        IQueryDescriptor.setParameterValues(parameterValues)

Having said that, the setParameterValues() method is deprecated and there is no hint how the replacement should look like (4.0.1 API) and I was also not able to easily find other references.

If the query has parameters, you could try that. I don't know how to create Expressions with parameters though.

Comments
Ralph Schoon commented Apr 02 '15, 4:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I think a parameter is introduced to an Expression like this:

        Expression in_ProjectArea = new VariableAttributeExpression(attribute,
                AttributeOperation.EQUALS, (IAttributeVariable<?>)projectArea );

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.