Erp-baq send list parameter to a baq

I can’t share it directly, though I’d love to, but here’s all the info you’d need to build it:

Assembly:

Service:

Params:

Function Code:

CallService<DynamicQuerySvcContract>(dqSvc =>
{     
  Ice.Tablesets.QueryExecutionTableset QEts = dqSvc.GetQueryExecutionParametersByID("JobGrid");
  QEts.ExecutionParameter.Clear();
  
  var payload = new {
      JobsList = this.pJobsList
  };

  var JobsList = payload.JobsList.Split(',');
  foreach (var job in JobsList)
  {
      QEts.ExecutionParameter.Add(new ExecutionParameterRow 
      {
        ParameterID = "JobNum",
        ParameterValue = job.Trim().ToString()
      });
  }
      
  DataSet qeDS = dqSvc.ExecuteByID("JobGrid", QEts);
      
  if (qeDS.Tables[0].Rows.Count>0)
  {
    this.oDs = qeDS; 
  }        
});

I hope this helps.

3 Likes

Maybe if you choose ‘specified constant list’ and just left it empty? Too late for me to try, but worth a shot.

1 Like

Yeah either that or I’m thinking of passing pure client-side Where clauses which I know for sure does indeed work (aside from a couple caveats already mensioned). Distinction being the IN() criteria is not modeled in the BAQ designer.

like:

2 Likes

Oh, I see what you’re saying now! Next time I come across this challenge, I’ll be sure to come back here. That’s way easier!

2 Likes

Thanks!

1 Like

FWIW, the BAQ Options > Where: IN() method does seems to work well.
using this syntax:

Job_JobNum IN (?{TransView.JobsSQL})

see:

2 Likes