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

RRDI: How to get non-string values of custom attributes?

Hi
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.jazz.reports.doc%2Ftopics%2Fqm_t_customatt.html shows how to get e Sting extension value. How do I do the same for an integer extension?
I tried the following:
if ( = 'completedefforts') THEN
(..)
ELSE ('')
but that gives me an error:

RQP-DEF-0177

An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.
UDA-SQL-0144 An arithmetic exception was detected. SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 UDA-CUR-0000 Unable to fetch the row

If I look at the properties of (.., it shows as
Data type Int32 (Integer)

I can get the (string) value if I cast it to a varchar as:
if ( = 'completedefforts') THEN
(cast(..,varchar(3)))
ELSE ('')

but then I assume I need to do some reverse casting back into integer to do any count or total type stuff on the value.

Is there a way to just get the integer vale in the query without having to do the cast and recast?

0 votes



2 answers

Permanent link
I think the problem is that you're trying to potentially return both an integer or a string in the same data item which won't work.

Try changing the else clause to return null or a 0 instead.


if ([Custom Attribute Name for Bug] = 'completedefforts') THEN
([Business View].[Request Integer Extension].[Value])
ELSE (null)



Hi
https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.jazz.reports.doc%2Ftopics%2Fqm_t_customatt.html shows how to get e Sting extension value. How do I do the same for an integer extension?
I tried the following:
if ( = 'completedefforts') THEN
(..)
ELSE ('')
but that gives me an error:

RQP-DEF-0177

An error occurred while performing operation 'sqlScrollBulkFetch' status='-232'.
UDA-SQL-0144 An arithmetic exception was detected. SQL0420N Invalid character found in a character string argument of the function "DECFLOAT". SQLSTATE=22018 UDA-CUR-0000 Unable to fetch the row

If I look at the properties of (.., it shows as
Data type Int32 (Integer)

I can get the (string) value if I cast it to a varchar as:
if ( = 'completedefforts') THEN
(cast(..,varchar(3)))
ELSE ('')

but then I assume I need to do some reverse casting back into integer to do any count or total type stuff on the value.

Is there a way to just get the integer vale in the query without having to do the cast and recast?

0 votes


Permanent link
Perfect! That worked.
Thanks!

I think the problem is that you're trying to potentially return both an integer or a string in the same data item which won't work.

Try changing the else clause to return null or a 0 instead.


if ([Custom Attribute Name for Bug] = 'completedefforts') THEN
([Business View].[Request Integer Extension].[Value])
ELSE (null)

0 votes

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

Question asked: Aug 11 '11, 10:25 p.m.

Question was seen: 8,825 times

Last updated: Aug 11 '11, 10:25 p.m.

Confirmation Cancel Confirm