Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2005

Tip: Looking for answers? Try searching our database.

Drop Down List Error After Submit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
davas100 - 22 Jun 2005 10:00 GMT
I have a drop-down list that uses a secondry data source (SQL table). The
display name of the drop-down is set to a description and the value is set to
the primary key of the DB entry relating to the description. Everything works
OK (you select the displayed description and the correct code is submitted to
the DB) ... until you submit the form data to the DB. After this the
drop-down shows the value and not the description as before.

Has anyone experienced this error before?
Scott L. Heim [MSFT] - 22 Jun 2005 21:39 GMT
Hi,

I have not seen this behavior before. When you submit to the database does
the primary key value for this drop-down box get modified?

Can you reproduce this using a simple example?

Thanks,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
davas100 - 23 Jun 2005 10:02 GMT
Thanks for your reply Scott...

There is no non-default behaviour set-up with the submit to the database.
The only more complex aspect is a filter on the secondary data source that
restricts the choices.

As an example of the problem:

Table in DB of locations:
LocationCode (key), LocationDesc, LocationType
CDLN, London, 0
CDMN, Manchester, 0
CDNE, Newcastle, 1

(The filter as mentioned above is based on LocationType)

The drop down displays the description (London, Newcastle etc.) but has it's
value set to the LocationCode (CDLN, CDNE). The data is submitted correctly
to the database (user selects London and CDLN is put into the DB). Once the
submit is complete, the drop-down displays the LocationCode that has just
been sent to the DB and it's 'value' is blank.

Hope i explained that as best i can.

> Hi,
>
[quoted text clipped - 9 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 23 Jun 2005 13:07 GMT
Hi,

Thank you for the additional information. To be sure I am testing properly,
I have a couple of additional clarifications I would like to ask:

- Your secondary data source (Locations) is indeed a SQL table - is your
main form fields based on a different SQL table?
- If the above is yes, is the main table "related" in any way to the
Locations table?
- You indicated there is a filter on the Locations based on Type - how does
this get set? Is this a hard-coded value or is there something the user is
doing to "set" the filter?

Now - this is how I am planning on setting up a test...let me know if this
is correct:

- Create a new InfoPath form from a SQL table (i.e. the Orders table from
Northwind)
- This table has a "CustomerID" field that one must enter when adding a new
order - as such, I was going to make this a drop-down list that uses a
secondary data connection to the Customers table. The drop-down list will
display the customer name but use the CustomerID as the value
- I would then add a new order, select a customer, fill in necessary fields
and then submit

Do these steps appear correct?

Thanks again!

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
davas100 - 28 Jun 2005 15:39 GMT
Scott,

Sorry for the time between replies... I've tried recreating the drop-down
from scratch but with no luck... very frustrating!

> - Your secondary data source (Locations) is indeed a SQL table - is your
> main form fields based on a different SQL table?
> - If the above is yes, is the main table "related" in any way to the
> Locations table?

Yes both the main form and the secondary data source are SQL tables. They
are related by a single FK (LocationCode).

> - You indicated there is a filter on the Locations based on Type - how does
> this get set? Is this a hard-coded value or is there something the user is
> doing to "set" the filter?

The filter is hard-coded.

> Do these steps appear correct?

Yes that sounds OK... i suggest you try using a filter also.

Regards

Chris

> Hi,
>
> Thank you for the additional information. To be sure I am testing properly,
> I have a couple of additional clarifications I would like to ask:

> Now - this is how I am planning on setting up a test...let me know if this
> is correct:
[quoted text clipped - 7 lines]
> - I would then add a new order, select a customer, fill in necessary fields
> and then submit

> Thanks again!
>
[quoted text clipped - 4 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 29 Jun 2005 22:47 GMT
Hi Chris,

Please accept my apologies for the delay as I was unexpectedly out of the
office for a few days.

Did you get this issue resolved or do you still need assistance?

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights
davas100 - 30 Jun 2005 09:03 GMT
I eventually fixed the problem yesterday. I think it could have been down to
the design/layout of my form. I did have the drop-down outside of the
repeating section (but bound to that same section). I've now placed the
drop-down in the correct place and it works ok.

Thanks for your help Scott

Regards

Chris

> Hi Chris,
>
[quoted text clipped - 7 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.