Text Box not Updating When Value of Dropdown Changes - InfoPath Dev
in

InfoPath Dev

Text Box not Updating When Value of Dropdown Changes

Last post 05-03-2012 08:18 AM by kominski. 24 replies.
Page 1 of 2 (25 items) 1 2 Next >
Sort Posts: Previous Next
  • 04-12-2012 08:06 AM

    Text Box not Updating When Value of Dropdown Changes

    Not sure if I am missing something. I have a web enabled form. There is a drop-down box called Supervisor. In the Supervisor dropdown I have a data connection to a list in SharePoint 2007 called Firewall Request Form Approvers. Then there is a text box called SupervisorUserName. I have added a rule to the Supervisor dropdown to 'set a field's value' of the SupervisorUserName to one of the values in the Firewall Request Form Approvers. When I publish the form and test it the SupervisorUserName does not update when I change the value in the Supervisor field. Any suggestions???

     

    I am using InfoPath 2007, SharePoint 2007.

  • 04-12-2012 08:15 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    But does it work when you preview the form? If it works in preview but not in the browser, it may be a postback issue. If so, right click the drop down control and select the properties - in the properties dialog, on the browser tab, try setting postback to always.

    Hilary Stoupa

  • 04-12-2012 08:21 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Thank you for responding. It is displaying in the Preview and Browser. But when I change the Supervisor name it is not updating the SupervisorUserName field. I did set the postback to always.

  • 04-12-2012 08:25 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    I don't understand what this means:

    kominski:
    It is displaying in the Preview and Browser.

    It sounds like maybe you don't have your rule set correctly?

    That is - if the rule works correctly in preview, but not in browser, it is postback.

    If the rule doesn't work correctly, it is the rule itself.... What's your rule?

    Hilary Stoupa

  • 04-12-2012 08:31 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Set a field's value: supervisorUserName = @User_Name 

    User_Name is a field in the SharePoint Firewall Request Form Approval List

     

  • 04-12-2012 08:38 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    I'll assume from your reply you are saying that the rule itself is not working correctly? Not that you are having different behavior between browser and preview?

    So - you don't have any filters on the rule - do all instances of the User_Name field have a value? Are there multiple entries in that list? Your rule will set the supervisorUserName field to the first instance of the User_Name in the SharePoint Firewall Request Form Approval List.

    You should temporarily drag that data source onto your form, so you can see what the values are....

    Hilary Stoupa

  • 04-12-2012 08:45 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    All instance have a value for User_Name. There are 13 different Supervisors in the list. It is defaulting to the first instance of the User_Name from the SharePoint Firewall Request Form Approval List. You mentioned not having filters on the rule. Should I have a filter on the Rule? I appreciate your help with this.

  • 04-12-2012 08:53 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Yup, you just need a filter.

    So, on your rule, your value is currently User_Name. Click the fx box to open the formula editor again. Highlight the User_Name field and select Insert Field or Group. IP should open up a data source window with the field selected. In the lower left corner, you'll see a filter data button. Click that.

    Now you'll need to add your filter... How will you know which field is the correct one? I'm assuming there is some other data in the form that matches something in your list to let you know which user name you need?

    Hilary Stoupa

  • 04-12-2012 09:03 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    OK. So I am going through the steps. I am at the Specify Filter Conditions window.

     When the user is filling out the form they will select the name of the Supervisor.

    Not sure I understand what you mean by  'I'm assuming there is some other data in the form that matches something in your list to let you know which user name you need?'

  • 04-12-2012 09:24 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Well, you have a SharePoint list - it has user names, among other things. When the user selects the name of the Supervisor - is that drop down using the same data source as the list with the user names?

    Do you mind attaching your form to the Options tab? I can probably put this in place for you pretty easily, and then you'll see what I mean....

    Hilary Stoupa

  • 04-12-2012 10:10 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    That is so nice of you. Thank you. I attached the form. To answer your question, yes when the user selects the name of the Supervisor - it is a drop down using the same data source as the list with the user names.

  • 04-12-2012 10:17 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    So.... you attached the XML that the form creates, rather than the form template. Can you attach the form template - the XSN file? :-)

     

    Hilary Stoupa

  • 04-12-2012 10:23 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Whops..... Here you go.

  • 04-12-2012 10:40 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    Okay, attaching the template to this reply, and more info to the next. To use the template, you need to save it locally. Then you can right click the saved file, and select Design - this will open the form in design mode.

    From there, you can save the file locally, preview, etc.

    Hilary Stoupa

  • 04-12-2012 10:45 AM In reply to

    Re: Text Box not Updating When Value of Dropdown Changes

    So, your supervisor drop down uses the AD_ID for the value - that means the supervisor node will have the AD_ID for it's value - even though the drop down displays the User_Name.

    The filter then, needs to select the User_Name where the AD_ID in the same secondary data source is equal to the supervisor field in the main data source.


    Hilary Stoupa

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