質問

I have two tables, Customer and Address. One customer can have one or more addresses.

My view is a ListDetail with all my customers on the left as a list and the edition on the right.

Under the edition I have the "address area" with a list of addresses and an edition on the selected.

My problem is all my addresses are listed. I just want addresses with the matching customerId (selected on the first list).

Here is a drawing to help you see what I am talking about: enter image description here

I can create a button on the first list that show a popup with the selected Id but I don't know how to put a parameter on my address collection.

Please tell me if you need more details.

Edit : A good example of what I want is the 'Roles' view created by default. I haven't found how to edit this view to see how it works but if you select a 'role' the list of users is updated to show only those that have this role.

役に立ちましたか?

解決

If your two tables are related (meaning you've created a relationship between them in the table designer), then what you describe should happen automatically. Using the Add Screen wizard, you can tick the "related data" checkboxes for any related tables that you want to display for the selected item.

If you didn't tick the checkbox for a table, you can still drag the navigation property (created when you added the relationship), which is on the left side of the screen designer (with a + next to it).

To do it manually, you need to create a modeled query (a query based on a table, or on another query), to which you add an integer parameter, then add a filter based on that parameter.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top