I have headdata (Table head) and linedata (table line).
Instead of showing all headdata and selecting linedata,
I want to show all linedata and select the corresponding headdata.
This works fine, I have joined headdatasource to linedata.
My problem concerns the filter on my headdata.
To evaluate the filter in headdata_ds.executeQuery is not the
right place. The query to search for linedata has to be a join
on headdata. The filter values have to be put in this join query.
So I create a query with a childDatasource.
This is code in linedata_ds.init()
public void init()
{
super();
.....
headQBD = this.query().dataSourceNo(1).addDataS
ource(tablenum(HEAD));
headQBD.LinkFields( "LinkField-Head", "LinkField-Line" );
headQBD.joinMode(JoinMode::InnerJoin);
filterHead = headQBD.addRange(fieldNum(HEAD, filterfield));
}
and now linedata_ds.executeQuery :
public void executeQuery()
{
if(formControl.selection() !=0 )
filterHead.value(int2str(formControl.selection()));
else
filterHead.value('');
super();
}
FormControl modified - event calls linedata_ds.executeQuery.
The filter has no effect on the selection of linedata.
Does anyone know why ?
Is there any example in Axapta which hits my problem ?
Regards
Manfred
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.