Solved

Pass multiple values to build project analysis


  • Anonymous
  • 0 replies

We have a dashboard with a customization that includes a button to launch the Build Project Analysis. Currently, it’s coded to pass only one value for ProjectID from the grid, even if multiple rows are selected. How do I code it to pass multiple ProjectIDs to the Process Caller? Thanks.

icon

Best answer by Anonymous 13 May 2021, 00:08

View original

2 replies

I suppose my issue is a specific case of a more general issue: is it possible to select multiple values of the same field from a BAQ result, dashboard, etc, and then pass all of them to another program opened with the context menu?

 In this image, I have 3 different Project IDs selected from a BAQ, but only the one that I actually get right clicked on gets passed to the Project Tracker, Build Project Analysis, etc. Any guidance is most certainly welcome.

 

I figured out how to do this, and I’ll explain how.

I ran a trace log just on the Build Project Analysis and loaded multiple ProjectIDs. I saw this interesting line from the trace:

 

It led me to suspect the underlying BO took not multiple input parameters, but a single string value parameter composed of ProjectID concatenated with tildes. So then I asked, how do I construct such a string within the dashboard customization to pass to the Process Caller? Well, this is how:

 

private void btnBuildProjAnls_MouseClick(object sender, System.Windows.Forms.MouseEventArgs args) { LaunchFormOptions opts = new LaunchFormOptions(); try {var dataRows = RRHeader.Selected.Rows; //RRHeader is the grid in question string projectIDString = ""; foreach(Infragistics.Win.UltraWinGrid.UltraGridRow gridRow in dataRows) { projectIDString = projectIDString + "~" + gridRow.Cells["ProjectCst_ProjectID"].Value.ToString(); } opts.ValueIn = projectIDString.Substring(1); //Have to trim off the leading ~ ProcessCaller.LaunchForm(oTrans,"Erp.UIProc.GenerateAnalysis.dll", opts); } catch{} }

It works! What do y’all think?

Reply