locked
DropDown lIst does not get Updated RRS feed

  • Question

  • I have a DropDownList, Textbox, button control on Infopath form. I have made a data connection with sharepoint list.What i want is, While filling out form if i write something inside textbox then that textbox value should get inserted inside the sharepoint list and simultaneously to DropDown list.

    I have done with inserting item into sharepoint list but it doesn't get reflect inside DropdownList. Whenever i open the form next time it shows me the value. But i want it to be get reflected as i add item to list.

    Saturday, October 13, 2012 11:26 AM

Answers

  • Hi Niraj,

    Just add the following line in your code after updating the list.

    this.DataConnections["Data connection name"].Execute();

    This should do the work.

    Thanks,

    Raviraj

    • Marked as answer by NirajZ Monday, October 15, 2012 8:36 AM
    Monday, October 15, 2012 8:07 AM

All replies

  • Hi ,

    I understand that you have added a textbox and dropdown list control on the form to insert values to the list. I assume that you use the button control to insert the data in the text box control to SharePoint list. The dropdown list control gets value from an external data source that is the SharePoint list.

    The data connection only load the data from the form on form load or when you use rules to query for data. After you submit the textbox value to list, the data connection doesn’t communicate with SharePoint list to update data. So the dropdown list control remains the same until next time it is opened. You can add a rule to query using the list data connection after submit. Then the dropdown list will be updated in time.

    Thanks,

    Entan Ming


    Entan Ming

    TechNet Community Support

    • Proposed as answer by Raviraj9987 Monday, October 15, 2012 8:07 AM
    Monday, October 15, 2012 7:02 AM
  • Hi Niraj,

    Just add the following line in your code after updating the list.

    this.DataConnections["Data connection name"].Execute();

    This should do the work.

    Thanks,

    Raviraj

    • Marked as answer by NirajZ Monday, October 15, 2012 8:36 AM
    Monday, October 15, 2012 8:07 AM
  • Its an Awesome Solution, Raviraj

    Thanks for Reply...

    Monday, October 15, 2012 8:37 AM