Can't override a default value of a text box function - InfoPath Dev
in

InfoPath Dev

Can't override a default value of a text box function

Last post 10-15-2010 07:21 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-15-2010 06:29 AM

    Can't override a default value of a text box function

    I have a text box that calculates the default value based on the values of other fields. I need the ability to override this default value and enter in a static value. The problem is when I enter in my static value and save the form, close it and reopen the form the calculated value shows instead of the static value I entered.



    Any idea what might be causing this?
  • 10-15-2010 07:21 AM In reply to

    Re: Can't override a default value of a text box function

    Most likely this is happening because one of the fields being used in the default value is being set or modified when the form is opened, and you have the "Update this value when..." option selected.

    Allowing a field with a default value to be overriden is a tricky proposition.  I'd suggest providing a separate field for allowing user input, and not letting them modify the calculated one.  You can display the calculated value in an expression box for users to use as a reference.

     If this value then needs to be used in other calculations, you can use this expression, which will take on the value of the calculated field if the user-editable one is blank, and the value of the user-editable field if it's not blank:

    concat(substring(calculatedField, 1, (userField = "") * 100), substring(userField, 1, (userField != "") * 100))

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.