Good morning,
I am trying to crack this tough nut again. See previous users attempts here:
I have a custom form that I use to add operations to a part method master. The custom form works great, but I would like to add a button to open the methods tracker form. That way a user can quickly check to see that the part has been updated correctly.
As you can see in the second post linked above, I attempted to create a button on my custom form like this:
private void epiButtonC2_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
LaunchFormOptions lfo = new LaunchFormOptions();
lfo.ContextValue = "PartNum, RevisionNum";
ProcessCaller.LaunchForm(oTrans, "UDGO3000", lfo);
}
Just like other users have said, this opens the Engineering Workbench instead of Method Tracker. @josecgomez, you said this is not a trivial form to open due to the constraints required. Can you elaborate on how one might pass the right parameters, and get the methods master form to open via a button click on a custom form?
12/3/20 EDIT: I have run several traces, and I canât seem to find the BO that is used to open a form. The action seems to be taking place within the GenXDataImpl BO. But it looks like they are all GetByID or GetByList methods. Does the trace document the call to open the method tracker form?
12/9/20 EDIT: Still no lock launching the method form, I always get the engineering workbench. I modified the title of this post a bit to be more inclusive. Perhaps someone could get me started by explaining how to open any form from a button click. Is ProcessCaller.LaunchForm the only/best way?
Iâm back trying to do this in a new place also, having had difficulties and giving up in a different area a couple years back. Did you ever figure this out?
Hi Nancy,
Unfortunately, no. My button still opens the Engineering Workbench instead of Method Tracker. If you get anywhere with this, please share it here!
Thanks!
Nate
I have found that the Method Tracker is not always there when I add the revision field. I can open the part tracker, and then dive into the rev from there, but I canât get to method tracker from my own form, no matter what I have tried.
I am not sure what you mean. I started with a UBAQ âAddAnyOpâ. From that, I created a customized dashboard that shows the results of that query, as well as a blank tracker form that I customized to have a bunch of fields and buttons. Where is the dataview you are referenceing?
Youâre right, it works! It was a little wonky with runtime dashboard at first but I think I now have it working in a stable manner with a deployed dashboard (after clearing client cache well).
So Nate, I have a dashboard that pulls JobMatl and JobOper data in and I wanted to do an âopen withâ in the dashboard on the part revision field in the JobMatl and JobOper data (second screenshot below). Per Johnâs context menu suggestion (first screenshot), I added Method Tracker to the PartRev.RevisionNum menu (NOT the PartRev.RevisionNumber menu), per below. Now I have the âopen withâ off of a PartRev field from the Job header /matl data working. I did at one point also have it open the engineering workbench instead of the Method tracker. Iâm not sure how it got fixed, perhaps I was trying to use the PartRev.RevisionNumber context menu, or I didnât deploy assembly. I lost track when I was so excited that it worked!
One other thing, the addition of the Method Tracker to the PartRev.RevisionNum does show it duplicate on my open with from part entry similar to Johnâs post (screenshot 3). It doesnât seem to hurt so I think Iâll just tell anyone who asks to use either, it doesnât matter.
Hello @NateS , Iâve had a similar problem trying to launch a Form from a button where the base program has multiple forms, I used a program called ILSpy to have a look under the bonnet to see how the LFO was handled by the form⌠I found that it had an LFO object to choose which form to loadâŚ
Iâve just had a look at Engineering Workbench and it has similar
Just in case thereâs still interest here. LBarker got to the heart of it. But to make it more explicit, pass the values in with BOMTrackerArgs instead of LaunchFormOptions.