How To: Kinetic - Launch a Form using App Studio

Here are some more variations for posterity.

Multiple ValueIns and how to use them

{
	"options": {
		"valueIn": [
			{
				"orderNum": "{ShipDtl.OrderNum}"
			},
			{
				"orderLine": "{ShipDtl.OrderLine}"
			},
			{
				"orderRel": "{ShipDtl.OrderRelNum}"
			},
			{
				"partNum": "{ShipDtl.PartNum}"
			},
			{
				"packNum": "{ShipDtl.PackNum}"
			},
			{
				"qty": "{ShipDtl.DisplayInvQty}"
			}
		],
		"callBackToken": "partbinorder"
	}
}

On the launched form side, hook into some event and use row-update to set your fields to the values using this syntax.

%session.context.initialValueIn.ValueIn[0].orderNum%
%session.context.initialValueIn.ValueIn[1].orderLine%
%session.context.initialValueIn.ValueIn[2].orderRel%
%session.context.initialValueIn.ValueIn[3].partNum%
4 Likes

Yet ANOTHER iteration on the receiving app side.

Expression: %session.context.initialValueIn.ValueIn.options.valueIn[0].partNum%

image

Season 7 Ugh GIF by One Chicago


I guess the moral of the story here is to check out the context in Dev Tools in the launched app.
Open Dev Tools and enter epDebug.context in the console to get the image above and then mimic the initialValueIn property to drill down into your context field.

2 Likes

I’m trying to do this with the Pack Out Entry screen (Erp.UI.PackOutEntry). It doesn’t have a landing page and doesn’t seem to want to take the PackNum in the launch option. Is there anything unusual about this form?

Nope.

Create a layer on the Pack Out Entry screen and an event that sets the field on form load.

Thanks that worked like a champ.

1 Like

Thanks @hmwillett, together with @klincecum helped me sort out How to launch "Create case from CustID" from a button? - #10 by Chrisw

2 Likes

Have there been any known problems with 2023.1 in regards to launching a form on a specific layer?
I had been able to launch a JobEntry layer from a button in MES using these parameters:
image

Now, the same button launches JobEntry without a layer applied. However, the launched form still navigates to the “Details” panel of the base layer.
From the debug menu, it looks like the parameters have the correct layer to launch, but it somehow is not applying that. So, the issue must be within the layer itself?
image

Try making a menu item with that layer and launch to see if it works,
or go open it in app studio and see if it works correctly.

If it does, then this may be a bug.

The menu had been deployed before, and testing after the update, it launches and functions the way I expect.

I did delete the menu, and re-deployed using the same layer, with no change to the functionality. However, the app-open still opens the base layer. :frowning_face:

Just installed 2023.1.5 and tested–works fine for me, though I did test from ABC Code to Part Entry instead of from MES, but the functionality should be the same.

@ehowley double check that your layer is published.

*Edit–works in MES as well.

Strange, the layer shows published in App Studio.

Tried removing the launch options to see if the correct landing page launches, same result.

I must have screwed something up in the layer to cause this, since it’s working for you. Time to just make it from scratch again I think.

Make a new, super basic layer (like change a label or something) and see if that works before you start over.

Launched from the App-Open:

What is published to the menu:

My stupid button is nowhere to be seen.
image
Tabs have different names as well.

Try removing the “Who Launched”. (Not that I expect that to work, just removing variables)

Unfortunately same result,

maybe a fresh MES layer could get me to my stupid button :face_with_raised_eyebrow:

Also, try deleting the entire app-open widget and add it back to your event.

Try ticking the “Open in Design Mode” as well and see if that opens the expected layer.

Just tried it with a fresh app-open widget and without the launch options JSON.

It hits the normal JobEntry landing page, and has no button on the details tab.

Edit: Design mode opens NewLayer Hmmmm

Try a screen other than Job Entry and see if that works.

Tried SalesOrderEntry, since I had a layer made already.

New button, new app-open, opens the correct layer in design mode.