xpath to retrieve from association

0
hi all i want to retrieve data only related to particular customer. like if i enter customer and search it should list all mobile no related to that customer only any help please
asked
2 answers
0

I might help for you to go through the basic, online available Mendix training to get a better understanding. But in the mean time.

Assuming you have an Overview form that shows customers ? (in a datagrid or templategrid)

And created/generated a NewEdit form to hold the Dataview on Customer.

On that Customer-NewEdit form, use a Datagrid that gets its information using the (1-N) Customer - hasmobilephones - mobileFoon association

Without more inforamtion (as already pointed out) it is impossible for us to be more specific

answered
0

If you merely want to have a datagrid wih datasource 'xpath' that gets you all data for a particular customer, you would write something like (for example) this:

    //Sales.Customer[Name = 'Jansen']

This query retrieves all customers whose name is equal to Jansen. Associations can be added as needed.

However, if with

'like if i enter customer and search it should list all mobile no related to that customer only'

you mean 'I have a datagrid and I want to use the search filters to 'search' for only the data for a selected customer', I'd suggest you have the datagrid retrieve the data from database, and create a filter that takes the customer name via association.

answered