Button to Open Method Tracker or Any Form

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?

Thanks a bunch for your time!
Nate

Hi Nate,

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?

Thanks
Nancy

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

1 Like

Can’t they just open the method tracker through the Context menu for the revision?

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.

And you can’t add it to the context menu for that field/form?

How would I go about that?

What is the dataview you are using?

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?

I didn’t realize it was a dashboard.

Have you tried calling XAGO3000?

Yes, Although I didn’t mention it here, using XAGO3000 also opens EngWorkbench.

When you are in the Part Maintenance screen, the Context Menu option for the Method Tracker on the Revisions page is hard coded. (No idea why.)

If you go into the Context Menu Maintenance screen and pull up PartRev.RevisionNum add a new Menu Item and call Process ID XAGO3000.

The only problem is that the Part Maintenance Revision context menu will look like this.
image

Where the Method Tracker Revision context menu will look like this.
image

Well, using the context menu with XAGO3000 opens the Method Tracker.

Hi John,

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.

Hope this helps you too,
Nancy

3 Likes

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

1 Like

Kudos to @gingerhelp for us for the ILSpy tip.

1 Like

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.

	private void btnLaunchMethodTracker_Click(object sender, System.EventArgs args)

	{
		// ** Place Event Handling Code Here **

		string partNum = partNumber.Text;
		string revNum = revNumber.Text;
		string altMethod = "";
		bool isModal = false;

		if (partNum != String.Empty)
		{
		   BOMTrackerArgs bta = new BOMTrackerArgs(partNum, revNum, altMethod, isModal);
		   ProcessCaller.LaunchForm(oTrans, "XAGO3000", bta); 
		}	
		
	}```
3 Likes

That’s the right answer, it worked perfectly for me, thank you so much