dropdown selects wrong item after reopening form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

dropdown selects wrong item after reopening form

Last post 02-12-2014 01:06 PM by venkatkbv. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-08-2007 08:30 AM

    dropdown selects wrong item after reopening form

    Hi,

     I created a browser compatible form, showing 10 dropdowns. The values in the dropdowns come from secondary datasources (webservices). Everything displays well upon opening the form, and when saving the form, the correct values are stored in the database. The form submits to a webservice storing all values in a database.

    However, when I reopen the form I see this behavior:

    • dropdowns containing items with a string for display and an integer as value, show the correct items and select the correct item
    • dropdowns containing items with a string for display and the same string as value, show the correct items and select the correct item
    • dropdowns containing items with a string for display and a different string as value, show the complete list of display strings, but add one item on top being the saved value (this item is selected)

    For example:

    Items in dropdown :
    - display = Nederlands and value = nl
    - display = English and value = en
    - display = Français and value = fr

    On a new form, the items in the dropdown are Nederlands, English and Français. I select for example English and the value "en" is stored in the database. When I reopen the form, these items are displayed in the dropdown:
    - display = en and value = en (selected item)
    - display = Nederlands and value = nl
    - display = English and value = en
    - display = Français and value = fr

    Obviously, this is not really what I want to happen. :-)

    Do any of you experienced the same behavior and know a fix for this ? Any help is greatly appreciated !

    Regards,

    Tom

  • 01-03-2008 08:55 AM In reply to

    Re: dropdown selects wrong item after reopening form

    Hi vervoorttom,

    This is very weird and I have no idea how this would happen.  Maybe it is something strange with the view refreshing.  Did you ever figure it out?

    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-03-2008 10:13 AM In reply to

    Re: dropdown selects wrong item after reopening form

    Because I couldn't immediately find a solution for the problem and I was facing a deadline, I created my form in asp.net. This is when I discovered the cause of this behavior. Because of the database structure (which I couldn't change), when a value was selected in a dropdown (for example the username 'tvervoort'), it was stored in the database as 'tvervoort' with 41 spaces at the end, because the database column was a char(50). Of course, when the Infopath form was comparing the values, there was no match because of the spaces.

    Since everything is already working in asp.net, I won't finish the Infopath version of the form for now.

  • 02-12-2014 01:06 PM In reply to

    Re: dropdown selects wrong item after reopening form

     Hi Vervoorttom,

    I am stuck with a similar issue on Infopath 2010 now where i try to Publish about 30 different drop down boxes each with varying numerical value and some fields change before their publish to the server. However if i run it locally and use Infopath filler to edit it It is fine. 

    Do you have any work-arounds or solutions for it ?

    I am in a very bad need as i need to use a Sharepoint list and have it published there without these glitches. I unfortunately am no good in coding so that would be a ruled-out option for me.

     Any help would be much appreciated 

     

     

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