Absent Member.. TurboMan Absent Member..
Absent Member..
385 views

How to make a sub total in a table compoenent ?

Jump to solution

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.

 

0 Likes
1 Solution

Accepted Solutions
Absent Member.. AlexSavencu Absent Member..
Absent Member..

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

Jump to solution
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
0 Likes
2 Replies
Absent Member.. AlexSavencu Absent Member..
Absent Member..

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

Jump to solution
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
0 Likes
Absent Member.. TurboMan Absent Member..
Absent Member..

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

Jump to solution

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.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.