It's all about the answers!

Ask a question

Can we bind parameter(s) to RTC Query?


Sagar Baviskar (1135) | asked Apr 01 '15, 1:32 a.m.
edited Apr 02 '15, 3:33 a.m. by Ralph Schoon (55.5k23642)
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 (55.5k23642) | 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.