473,473 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XSLT- Counting value based on duplite clientID

4 New Member
Hello,
I got a question, as I'm not sure what is possible,
I'm setting up a page based on XSLT where I can see orders with Value ready to be send out to the client
I build in a function that if a order had a bigger value than 10K then a line manager has to approve,

This works,
But now the question I need to implement also a function that if 2 orders from the same client ID are above 10K that this needs to be approved,

So in short I need to create a selection on Duplicate client ID then do Total + total is $totalsum.

Now I don't have a clue where to start.

I found something which can make me start.
where I replace Surname with clientId and Firstname with total.

Expand|Select|Wrap|Line Numbers
  1. <xsl:key name="contacts-by-surname" match="contact" use="surname" />
  2. <xsl:template match="records">
  3.     <xsl:for-each select="contact[count(. | key('contacts-by-surname', surname)[1]) = 1]">
  4.         <xsl:sort select="surname" />
  5.         <xsl:value-of select="surname" />,<br />
  6.         <xsl:for-each select="key('contacts-by-surname', surname)">
  7.             <xsl:sort select="forename" />
  8.             <xsl:value-of select="forename" /> (<xsl:value-of select="title" />)<br />
  9.         </xsl:for-each>
  10.     </xsl:for-each>
  11. </xsl:template>
  12.  
But is this a right approach, I don't ask you to write a script, only advise me on a direction How To :).

Thanks Richard
Aug 15 '14 #1
0 2658

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lizard | last post by:
OK, total newbie here, so this may be a mind-numbingly dumb question AND I may be phrasing it badly. I have an xsl:template which looks like this: <xsl:template match="LoanRecord"> <hr>...
1
by: Richard G. | last post by:
Hi All, I am newbie in XML. I am designing a dynamic menu and retrieving data from xml. I have the xml file something like this: <?xml version="1.0" ?> <ROOT>
1
by: TRAX | last post by:
Here's my problem: I've got a table cities with the following tables: zipcode, city, province and table provinces: a table with: province_id, provincename cities.province and province.province_id...
11
by: garyusenet | last post by:
I have 'cli via c# on order', and in the mean time am reading 'Pro C# 2005 and the .NET platform' (Andrew Troelson). I'm just reading about the 'five types defined in the CTS'. Specifically Struct....
3
by: ajaypaidi | last post by:
HI gurus, i need to select a value based upon 2 columns.for instance,i have table A and Table B where Table A has 2,3,4,5 values and Table B has D,E,F,G,H,I,J,K L,M which is related to Table A in...
0
by: mervyn | last post by:
Hi There, I am very new to .NET and VB so this may be a really simple thing to solve but here is my issue I have a a textbox with a value in it. I know what the length of the text in the text...
2
by: jbaranski | last post by:
I have spent several days attempting to accomplish a certain task but am truly no closer than I was near the beginning. i need to return a single value based on an employees payment option;...
1
by: Naisargi | last post by:
A c++ prog to enter an integer & print its total value based on followin formula x-1/3!*3+1/5!*5-1/7!*7+1/9!*9
1
by: BaseballGraphs | last post by:
Hello, I am requiring some assistance in creating a function that will be able to look up and return a value based on an ID using javascript. I am having a user click a checkbox and the...
4
by: mcupito | last post by:
I am creating payouts, that can increase or decrease in value based on their NetAssetValue, which is determined each quarter. I have a Payroll Request table and NAV table. I am trying to update...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.