Formatting of data using with a data connection using owssvr.dll - InfoPath Dev
in

InfoPath Dev

Formatting of data using with a data connection using owssvr.dll

Last post 07-27-2009 03:32 AM by CraigW. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 05-28-2009 08:57 AM

    • mcorbran
    • Not Ranked
    • Joined on 03-18-2009
    • New York
    • Posts 9

    Formatting of data using with a data connection using owssvr.dll

    Hello All

    I am developing a form which I am connecting to a SP list and allowing the user to update that list and publish it back to the Sharepoint list.  I am using the owssvr.dll utility to download the SP list content as an XML file.  The only problem I am having is that the numbers are not coming across in the correct decimal precision. 

     For example, I have one column called Cost that is setup in the SP list as a number with 0 decimal places.  However when that number comes into the XML file from the owssvr.dll it includes 8 decimal places. 

    Any ideas on how to correct this? 

     Thanks

  • 05-31-2009 11:49 AM In reply to

    Re: Formatting of data using with a data connection using owssvr.dll

    Hi MCorban,

    SP uses SQL data types. InfoPath uses XML data types. There are known precision issues doing floating point calculations within InfoPath due to limits in the bits used to represent the numbers. My suggestion would be just to use a rule that sets the value of your field using the round() function. Double click on the field. Select Fx for default value and insert a round function with the secondary data source field that you want to copy the data from. Another approach would be to write some code, but you don't need it for this scenario. Good luck!

    Patrick Halstead
    Project Manager at Qdabra
  • 06-03-2009 04:41 PM In reply to

    • mcorbran
    • Not Ranked
    • Joined on 03-18-2009
    • New York
    • Posts 9

    Re: Formatting of data using with a data connection using owssvr.dll

    Patrick, thanks for the advice.  The data coming in from the Sharepoint list is populating a repeating table and allows the users to update the value and resubmit the data back to the list.  I have tried to create another repeating table and set the values of the new repeating table to be the round(values in the original table).  Appears that only the first row copies and after researching a little it appears that I would need to use code to copy data from one repeating table to another. 

     If that is the case, would it be better to just write code (not sure what kind of code) to format the data of the original data connection as opposed to writing code to copy from one repeating table to another. 

     Thanks again

  • 07-24-2009 04:02 AM In reply to

    Re: Formatting of data using with a data connection using owssvr.dll

    Hi Patrick,

    I have the same issue, how can I format the data?  When I add the data from owsvr.dll as a repeating table to InfoPath, the formatting options are all locked! 

    Craig

  • 07-27-2009 03:32 AM In reply to

    Re: Formatting of data using with a data connection using owssvr.dll

     I managed to get it to format, but had to use form-level rules on open to do so.

    Craig

Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.