Hi,
Also I need a button when the button is clicked the form needs to show the Transaction with receipt list when it is unchecked all PO needs to show.’’
Thank you.
Hi,
Also I need a button when the button is clicked the form needs to show the Transaction with receipt list when it is unchecked all PO needs to show.’’
Thank you.
You can do an exists join \Data Dictionary\Tables\VendReceiptsListJour
With which table I can do exists join?
What tables do you have in your form? PurchTable?
Add VendReceiptsListJour to PurchTable data source when you click that button.
qbdsReceiptListjour = PurchTable_ds.queryBuildDataSource().addDataSource(tableNum(VendReceiptsListJour ));
qbdsReceiptListjour .joinMode(JoinMode::ExistsJoin);
qbdsReceiptListjour .relations(true);
qbdsReceiptListjour .enanled(true);
purchTable_ds.executeQuery(); // execute the query again after joining
qbdsReceiptListjour → declare a QueryBuildDataSource variable in class declaration, so that you can disable it when ever you want. (qbdsReceiptListjour .enanled(false)
I overrided checkbox clicked method and added the following coding:
public void clicked()
{
Super();
if(this.checked())
{
qbdsReceiptListjour = PurchTable_ds.query().addDataSource(tableNum(VendReceiptsListJour));
qbdsReceiptListjour.joinMode(JoinMode::ExistsJoin);
qbdsReceiptListjour.relations(true);
qbdsReceiptListjour.enabled(true);
purchTable_ds.executeQuery();
}
}
But there is no changes in form
It should be working. Does VendReceiptsListJour has a relation to PurchTable (look at VendReceiptsListJour table relations)?
public void clicked()
{
Super();
if(this.checked())
{
qbdsReceiptListjour = PurchTable_ds.query().addDataSource(tableNum(VendReceiptsListJour));
qbdsReceiptListjour.joinMode(JoinMode::ExistsJoin);
qbdsReceiptListjour.relations(true);
qbdsReceiptListjour.enabled(true);
}
else
{
qbdsReceiptListjour.enabled(false);
}
PurchTable_ds.executeQuery();
}
Properties
Before clicking checkbox
After checkbox clicked, there is no change and form doesn’t have all purchase records
You don’t have to add data source in your form data sources. You are adding through the code.
I have asked you to into the table relations of VendReceiptListJour (not in the form)
Yes I created normal relation to purchid in VendReceiptListJour, still its showing all records…
qbdsReceiptListjour = PurchTable_ds.query().addDataSource(tableNum(VendReceiptsListJour));
Try by changing the above line in your code to,
qbdsReceiptListjour = PurchTable_ds.query().dataSourceTable(tableNum(PurchTable)).addDataSource(tableNum(VendReceiptsListJour));
It is not VendReceiptListJour. Use VendReceiptsListJour (missing ‘s’)
Yes Kranthi, Its working now.
Thank you…