cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to count the RQ's Text field's with specific text in report?

Chittaranjan_11
13-Aquamarine

How to count the RQ's Text field's with specific text in report?

I have 10 requirements in a document having short text field with various values

 

"free text" is a name of field which is of short text type and available on Requirement Type

 

Ex. there are 5 RQ's are having free text value is Black, 

Que: How to count the REQ's which are with Black value free text ? the count is needed on Report's computation.

REQ 1  --> free text = Black

REQ 2 --> free text = Black

REQ 3  --> free text = Green

REQ 4  --> free text = Yellow

REQ 5  --> free text = Red

REQ 6  --> free text = Black

REQ 7  --> free text = Black

REQ 8  --> free text = Pink

REQ 9  --> free text = Green

REQ 10  --> free text = Black

 

I tried with some aggregate functions, 

Count of Req's having free text value --> possible, But how to count with specific text ? 

aggregate("Contains", ByDocument(false, false), sum((Category="Functional Requirement" and SelectionCount("free text")!=0)?1:0))

2 REPLIES 2

Hi @Chittaranjan_11 

 

Try this:-

IsEmpty(aggregateByTree("Contains", References,sum(Category == "Functional Requirement" and "free text" == "Black" ? 1 : 0)), 0)

 

Or if that doesn't works:-

- Refer Help Material "Computed Expression Function Classes" page, there you will see all possible computation.

- If computation doesn't work at all for any reason and you need only this count in report (HTML page) use JavaScript in report code and you can count on the fly    and display where ever you would like to display. (This will not work if you want to show count in Integrity Item also this is only for report page)

 

Does this help?


Vielen Dank / Many Thanks

Kapil Jain

The provided workaround IsEmpty(aggregateByTree("Contains", References,sum(Category == "Functional Requirement" and "free text" == "Black" ? 1 : 0)), 0)  is not working.

 

Also as i checked in the manual "Computed Expression Function Classes" we cannot get anything for text value attribute.

Announcements