Call BAQ that uses EpiBinding with custom code

I want to know if it’s possible to call a BAQ from custom code that uses EpiBinding.
i know that creating a parameter for the BAQ could solve the problem, but i want to avoid having to maintain 2 BAQ that do the same thing.

this is the code i have to show data:

DynamicQueryAdapter dqa  = new DynamicQueryAdapter(oTrans);
    dqa.BOConnect();
    QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("EmailList");
    dqa.ExecuteByID("EmailtList",qeds);
    
    DataSet budgetDS = dqa.QueryResults;

        
    MessageBox.Show(budgetDS.Tables["Results"].Rows.Count.ToString());
	if(budgetDS.Tables["Results"].Rows.Count>0)
	{
		DataRow row = budgetDS.Tables["Results"].Rows[0];
		MessageBox.Show(row["Email_UD"].ToString());
	}
    dqa.Dispose();

I was reading this post, but it was not clear if it;s possible or not.

here is the example
3f67efd40f7478feb82e6b3a7d8871b4678ddaf0_2_661x500

hopefully someone can help,
gracias!

1 Like

BAQ Markup only seems to work with Combos, if you are doing something else and not using a BAQ Combo then look at

Look at the AddExecutionParamRow Line.

I would say maybe if you use BAQDataView… Maybe…

i tried but didn’t work,
thank you for the information anyway

Did you try BAQDataView?

i haven’t worked with them,
i am reading this post, but can’t seem to figure out how to use.

do you know where i can find an implementation example?

BAQDataView bdvLeaveUsage;
private void CreateBAQView() {
        // create the baq view and add it to the transaction
        bdvLeaveUsage = new BAQDataView("Payroll-Cust-LeaveUsage");
        oTrans.Add("LeaveUsageView", bdvLeaveUsage);
 
        // publish columns we'll bind to
        var yearBinding = "UD01.Year_c";
        var typeBinding = "UD01.Type_c";
 
        oTrans.PublishColumnChange(yearBinding, Guid.NewGuid().ToString());
        oTrans.PublishColumnChange(typeBinding, Guid.NewGuid().ToString());
        var yearPub = oTrans.GetPublisher(yearBinding);
        var typePub = oTrans.GetPublisher(typeBinding);
 
        // subscribe our BAQ view
        // NOTE: In E10 field names use the format with an underscore. will no longer work.
        bdvLeaveUsage.SubscribeToPublisher(yearPub.PublishName, "Calculated_PayRollYear");
     
        //Oh yeah this thing takes another param (string) called a condition ... SQL condition that is... so pass in
        //"=" or "like" or "begins" IE
        bdvLeaveUsage.SubscribeToPublisher(typePub.PublishName, "LaborDtl_IndirectCode", "like");
    }

let me give it a try,
thanks