OnDemand Users Group

Support Forums => ODWEK, Java and REST APIs => Topic started by: TTP4RFGrL3Ki on October 12, 2015, 09:31:03 PM

Title: How to get decimal precision of criteria
Post by: TTP4RFGrL3Ki on October 12, 2015, 09:31:03 PM
Does anybody know how to query the decimalPrecision value mentioned on this page?
http://www-01.ibm.com/support/knowledgecenter/?lang=en#!/ssw_ibm_i_72/com.ibm.ondemand.administeringi5os.doc/dodob006.htm

Neither in ODCriteria nor ODApplicationGroupField I found any function that returns the decimal precision value.
I can't believe that value isn't accessible with OD/WEK

Thanks a lot for any answer!
Title: Re: How to get decimal precision of criteria
Post by: Alessandro Perucchi on October 13, 2015, 01:33:33 PM
Hello,

You cannot.

The only you could have this information is by doing the following:


That will work, and yes this is not sexy :-) but with that method, you could basically have all the CMOD definition, and settings.

Hope that helps a little bit :-)

if you would like to have such information, in a more standard API, then you might need to open a PMR, or most probably ask the help of your IBM representative in order to request an enhancement of ODWEK.
You can also put this request in our "Enhancement Request" forum.

--
Alessandro
Title: Re: How to get decimal precision of criteria
Post by: TTP4RFGrL3Ki on October 13, 2015, 03:29:21 PM
Thanks a lot, Alessandro!

Since I developed somewhen in the past Lotus Notes databases I don't hesitate to follow even this XML approach ;)

This simple XML file gives me all I need:
<?xml version="1.0" encoding="UTF-8"?>
<onDemand xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ondemand.xsd">
    <folder name="AFP Folder 2"/>
</onDemand>


Best Regards,
Andreas
Title: Re: How to get decimal precision of criteria
Post by: Alessandro Perucchi on October 13, 2015, 05:12:13 PM
Great  :D

I didn't know that Lotus Database are so ... ODWEK like  ;D

Maybe I should try that kind of programming!!   ::)
Title: Re: How to get decimal precision of criteria
Post by: TTP4RFGrL3Ki on November 03, 2015, 12:56:18 PM
Seems I have a bonus question:
OnDemand delivers numbers with a comma as decimal separator.
So far I didn't see any method in OD/WEK or attribute in ondemand.xsd that tells me how to parse decimal numbers.

??? Should parsing of decimal numbers be controlled by some locale? And yes - where to get it? ???

Any help is highly appreciated!

Andreas

P.S.: Notes databases are great for certain purposes however seem not to be a perfect fit for things like repeating appointments in a calendar. Probably Notes programming has changed a lot in the past years, I just remembered the good old @ language...
Title: Re: How to get decimal precision of criteria
Post by: Justin Derrick on November 03, 2015, 08:37:58 PM
Quote from: TTP4RFGrL3Ki on November 03, 2015, 12:56:18 PM
OnDemand delivers numbers with a comma as decimal separator.

This seems like it would be set by your system's language parameters.  I'm not sure exactly where this 'Locale' setting would present the stored value as being formatted for a specific region.  In UNIX/Linux, it's the LANG and/or LOCALE environment variable.  In the database, it could be determined by your codepage.  I have no idea where exactly the substitution happens.

-JD.
Title: Re: How to get decimal precision of criteria
Post by: TTP4RFGrL3Ki on November 04, 2015, 05:12:15 AM
Thank you for the quick response!

At least I know now that I didn't miss an obvious method/attribute.
I'll do some more investigation...

Andreas