on 11-19-2008 11:43 AM
Hi All,
We are having a requirement where we are having a field which holds a decimal value. So, we need to round it to nearest decimal and then we need to compare it with "0.000".
We need to implement this condition in Standard Receiver Determination..
So i need X-Path function for rounding to nearest decimal.
If anyone can provide any info regarding this would really help..
Thanks,
Sudha
hi,
if you won't find any standard fuction for that
you can do it in java easily:
1. create an adapter module that will check the condition and
will be filling some custom ASMA
2. then in receiver det you can check this ASMA
this way only java limits you and not the xpath
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sudha there is a standard function formatnum use that in a particular way lik #####.00 formats to two decimal places.
###.0000 to four decimal places...
and in your case i guess u can place it in ###.0 format and try comparing...
Edited by: ROBIN C on Nov 19, 2008 5:28 PM
Edited by: ROBIN C on Nov 19, 2008 5:29 PM
Check the numeric functions to see if they satisfy your need.
http://www.w3schools.com/Xpath/xpath_functions.asp#numeric
Can you give a example of what you need?
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
use round- half- to- even(field,3) . i guess this wil meet ur requirement..
for a reference kindly chk this link
[http://books.google.co.in/books?id=kcqaqDGpj1MC&pg=PA212&lpg=PA212&dq=roundingto2decimalsin+xpath&source=web&ots=z3dJhBFScM&sig=eypacJpsX98DVUdVCtZWsp7DExI&hl=en&sa=X&oi=book_result&resnum=2&ct=result]
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.