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

Can we bind parameter(s) to RTC Query?

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

0 votes



One answer

Permanent link
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.

0 votes

Comments

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 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
× 10,938
× 411

Question asked: Apr 01 '15, 1:32 a.m.

Question was seen: 4,919 times

Last updated: Apr 02 '15, 4:52 a.m.

Confirmation Cancel Confirm