The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a sub total in a table compoenent ?

SOLVED
Go to solution
Highlighted
TurboMan
Member

How to make a sub total in a table compoenent ?

Hi,

 

I wonder if there is a way of sub totaling a column in a table compoenent.

I've found a work around as follows. It is quick and dirty.

 

Add another Text field call it "Total Time:" and define a rule as

Rule Event: Apply before save

Dependencies: "Request no contains any value" and "Request Satus = <Request status>." 

Results :

SQL:

SELECT sum(nvl(parameter4, 0)),sum(nvl(parameter4, 0)) FROM  KCRT_TABLE_ENTRIES_V
where request_id='[REQ.REQUEST_ID]'

Result Fields:

"Total Time:"

 

If there is a better solution, please let me know.

Any help is appreciated.

 

Regards

T.M.

 

2 REPLIES
AlexSavencu
Honored Contributor
Solution

Re: How to make a sub total in a table compoenent ?

Hi,

Your approach will fail when you add the second table component to the form, that is will produce wrong results.

I would recommend to use table component tokens. Check out the PPM guides, they are described pretty well.

Cheers
Alex

--remember to kudos people who helped solve your problem
TurboMan
Member

Re: How to make a sub total in a table compoenent ?

Thanks Alex,

 

I've digged into Command Tokens and Validation Guide, there is a good example.

I've put the label which shows the total, I defined a page load rule and used the table token.

 

Regards

T.M.

//Add this to "OnDomLoad" event