decimal places in calculated sharepoint list field unmanageable in infopath repeating table - InfoPath Dev
in

InfoPath Dev

decimal places in calculated sharepoint list field unmanageable in infopath repeating table

Last post 05-27-2015 06:08 AM by prasanna.b. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-26-2012 08:11 AM

    • beanyjon
    • Not Ranked
      Male
    • Joined on 02-22-2012
    • Coventry, UK
    • Posts 22

    decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Please can sombody help, i have a very frustrating problem.

     I have created a list in sharepoint 2010 with several number fields. i have then created a calculated column to add those fields together and set it to 2 decimal places. Check on screen and it works great.

    Then i have created a new blank infopath 2010 browser based form and inserted that list as a repeating table. All of the fields display fine except for the calculated column which shows with about 10 decimal places, i cannot find a way to specify 2 decimal places on this field within infopath, but should i have to? why is it not keeping the settings specified in the list?

    Can any one help me with this? i just need to get it to display as 2 decimal places.

    Thanks in advance :)

  • 03-26-2012 10:27 AM In reply to

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Try clicking on the control and opening up the properties.  Click on Format and setting the decimal dropdown there.
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-26-2012 10:34 AM In reply to

    • beanyjon
    • Not Ranked
      Male
    • Joined on 02-22-2012
    • Coventry, UK
    • Posts 22

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    The format button is greyed out because it's a calculated field in a repeating table.
  • 03-26-2012 10:38 AM In reply to

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Bummer :(

    Did you try creating a "temp" field and setting the default value to the calculated value?  Then you can format the new temp field with the proper decimal settings.  If you don't want the extra field, you can try a calculated value and see if you get the format options there.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-26-2012 10:42 AM In reply to

    • beanyjon
    • Not Ranked
      Male
    • Joined on 02-22-2012
    • Coventry, UK
    • Posts 22

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Yeah created a temp field but as soon as I drag it into the repeating table it takes on all of the same properties as the existing field. Is it normal for a all of the properties to be greyed out on a sharepoint calculated field in a repeating table? It's the same in all of my forms that use calculated columns in sharepoint lists :(
  • 03-27-2012 08:09 AM In reply to

    • beanyjon
    • Not Ranked
      Male
    • Joined on 02-22-2012
    • Coventry, UK
    • Posts 22

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    I managed to find a work around for this....

    for every calculated column in the sharepoint list i created another number field and set the correct decimal places. Then i hid these fields from the input form and created a workflow which would activate when a new item was added or existing item was changed. the workflow set the new fields value with the value from its corresponding calculated field. (Not ideal as i now have two columns displaying the same data)

    i then updated my data connections in infopath to display these new fields, deleted the calculated column controls from the repeating table and put these new column controls in, in thier place.

    All works and the format button is not greyed out on these new columns as they are not calculated columns so i can change the formatting.

    This is probably not the best way to do it but it works. If anyone knows how to be able to format a calculated column field in infopath then i would be interested to know.

    Hope this has helped someone else like me!

  • 03-27-2012 08:48 AM In reply to

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Great that you figured out a workaround.  Thanks for sharing!

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 05-27-2015 06:08 AM In reply to

    Re: decimal places in calculated sharepoint list field unmanageable in infopath repeating table

    Hi beanyjon, Instead of creating new column for each field and setting value using workflow, you can use below string funtion in calculated field... =LEFT([YourDecimalValueFormula],INT(FIND(".",[YourDecimalValueFormula])+2)) Output returns in single line of text type. It worked for me.
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.