Note we are talking about 2 totally different functions xdmp:format-number fn:format-number
From: [email protected] [mailto:[email protected]] On Behalf Of Christopher Cieslinski Sent: Tuesday, January 21, 2014 1:45 PM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] xdmp:format-number broken? Using the picture seems to work for me on MarkLogic 7.0-1. I usually always use the picture, I did not even know there were those other parameters. :) When would you use a picture vs. setting the grouping size/separator? Just curious if anyone knows the use cases for each. Chris Cieslinski From: Ryan Dew <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Friday, January 17, 2014 at 4:48 PM To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Subject: Re: [MarkLogic Dev General] xdmp:format-number broken? That is odd, but it seems you shouldn't have a problem accomplishing what you want just using a picture string like so: "#,##0" let $value := 12312312 return ( fn:format-number($value,"#,##0") ) ****RESULT**** 12,312,312 On Fri, Jan 17, 2014 at 4:38 PM, William Sawyer <[email protected]<mailto:[email protected]>> wrote: Has anyone been able to to get xdmp:format-number grouping-separator and group-size parameters to work? let $value := 12312312 let $picture := "0" let $language := "en" let $letter-value := () let $ordchar := () let $zero-padding := () let $grouping-separator := "," let $grouping-size := 3 return ( xdmp:format-number($value, $picture, $language, $letter-value, $ordchar, $zero-padding, $grouping-separator, $grouping-size) ) **** RESULT **** 12312312 _______________________________________________ General mailing list [email protected]<mailto:[email protected]> http://developer.marklogic.com/mailman/listinfo/general<https://urldefense.proofpoint.com/v1/url?u=http://developer.marklogic.com/mailman/listinfo/general&k=wlPCrglRP6kzT4RbABWMaw%3D%3D%0A&r=7I5W3kfsoen8LHYfpA9jJF64N4fpYpOq2IE0KRgYDd0%3D%0A&m=j4orwVoP6UFLyjGakAjF%2B5QQyrHLI2Hol%2B%2Bx7cDfgpo%3D%0A&s=04f06fbd5cb0df1ef900460f2a8fddfcd4d16c9ff906a007d31375dcedd1981e> NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
