Drop-downs and data sources

P

Philip Colmer

I've got a purchase request form that has some drop-downs populated from
data sources. For example, the line items have got:

* Department
* Account code

When the user picks "Department", the SQL query for Account Code is updated
so that only account codes valid for the selected department are returned.

I've now hit a problem. If a user has got a line item and selected the
department and account code, that is all fine. If the user then inserts a
second line item and picks a different department where the first account
code isn't valid, the display refreshes and instead of getting the textual
name of the account code, the value is displayed instead.

I understand why this is happening. The query for the data source is being
updated for the new line item, the account code isn't valid in the new
department so the lookup can't be performed so IP defaults to showing the
value instead.

What I need, though, is to find a solution where the text will always be
displayed. I've come up with some options but I'm not sure how viable they
might be.

Option 1: create fresh data sources for each line item, thus ensuring that a
given SQL query is unique to that row.
Option 2: somehow display static representations of the data, i.e. changing
the drop-down to a text field so that the name is displayed.

Does anyone else have any suggestions, or thoughts on the options I've come
up with?

--Philip
 
B

Bojana Marjanovic [MSFT]

I'm not sure why your first row should be affecting the second row. The only
reason I can see this happening is if you actually have the Department and
Account Code fields bound to the secondary data source and not just getting
the drop-down values from it.
Is this the case?
-Bojana
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top