display a different value from a control - InfoPath Dev
in

InfoPath Dev

display a different value from a control

Last post 04-07-2011 09:08 PM by Patrick Halstead. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-07-2011 04:33 PM

    • thoness
    • Not Ranked
      Male
    • Joined on 03-26-2008
    • Seattle, WA
    • Posts 25

    display a different value from a control

    I have several controls that needs to be calculated to 6 decimal places.  The user only wants to see 2 decimal places when printing or viewing. What is the best way to do this? 

    I was thinking of doing separate views but the formatting stays the same for all controls.  The other option I thought of was to use a control with formatting for the 2 decimal with a value of the 6 decimal control. Then use a different view to show only the fields with 2 decimal controls in place of the 6 decimal control?  That way the calculations are accurate to 6 digits but display only 2?  Is there a better idea?

  • 04-07-2011 09:08 PM In reply to

    Re: display a different value from a control

    Just add another field that is text and that gets set automatically when your calculated value changes. Use the xpath substring and concat functions to set the new text value to everything to the left of the decimal point followed by just two characters to the right. Drag this field to the view and make it read-only. Add conditional formatting so that the other field doesn't show after the text one is set. Conditional formatting also to hide the text field until the calculated value is selected. Anyway, that's the general idea. Lots of options here.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.