BPM form from a button

Hi @Banderson,
have you managed to do this? reading through this threads can not see any C# code to call the form directly through UI script editor,

am i correct saying that you are triggering the relevant BPM when clicking a button on UI form, then when the BPM run will go through a condition, to call the BPM Form ?

I ended up making a listener call and did all of the code in the customization instead of the BPM. I couldn’t figure out how to get the BPM to work since I needed to the filter prior to the BAQ being populated. The customization works great though.

I used help from code that @fredmeissner posted to get an idea of what to do.

Let me know if you have specific questions and I can post some of the code.

1 Like

@Banderson
i am very interested to see your code of doing it this way, as my way is triggering a callcontext variable and changing the relevant RowMod to Update status, when clicking my button, then these two will trigger my BPM and its form, my code on script editor screen of Part BO is:

private void btnEffExclude_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
EpiDataView edvCallContextBpmData = ((EpiDataView)(this.oTrans.EpiDataViews[“CallContextBpmData”]));
System.Data.DataRow edvCallContextBpmDataRow = edvCallContextBpmData.CurrentDataRow;
if ((edvCallContextBpmDataRow != null))
{
edvCallContextBpmDataRow.BeginEdit();
edvCallContextBpmDataRow[“Checkbox01”] = true;
edvCallContextBpmDataRow.EndEdit();
}
EpiDataView edvPartRev = ((EpiDataView)(this.oTrans.EpiDataViews[“PartRev”]));
System.Data.DataRow edvPartRevRow = edvPartRev.CurrentDataRow;
if(edvPartRevRow != null)
{
edvPartRevRow[“RowMod”] = ‘U’;
oTrans.Update();
}
}
this simply will trigger the following BPM which has a call for a BPM Form:

My final solution isn’t triggering a BPM at all. I’m assuming that what you mean by “it”? I just have listener set up to listen for a special character at the beginning of the barcode, and then parse the barcode to fill in the tracker values, run the BAQ, then use the results of the BAQ to run a loop to clock in based on what’s in the grid.

What is it that you want to do that you need help with?

i want the C# code to call the PBM form to pop it up without the need to trigger any BPM, capture the entered parameter, then save it directly on a UD field i created on that tt table, the BPM form is giving me a flexible control rather than create a std C# form.

Yeah, I couldn’t figure it out, because I couldn’t figure out where the hang the BPM on. I was trying to use a custom action on a BAQ so that it wouldn’t affect anything else, and that didn’t work. I was calling the query using the dynamic query adapter. But it didn’t work, so I abandoned the idea.

1 Like