I have a dashboard that I want to open from a context menu in quote entry. I have a context menu setup in Context Menu Maintenance for QuoteHed.QuoteNum and when I use the context menu, the dashboard does open like I need it to. However, I’d like to pass the quote number as an LFO. Any thoughts on how to accomplish this?
This post should be what you’re looking for:
You can ignore the sending part as that’s handled for you. You’ll want to use this disgusting string instead, though (valueIn, not contextValue):
%session.context.initialValueIn.valueIn%
I’m confused, what’s the end goal then? The quote number should be automagically passed to the dashboard, no event shenanigans required from the sender.
Right, so the end goal is to pass the QuoteNum to the dashboard so that it can populate a quote number filter for the user. Near as I could tell it was not being sent automatically, but it sounds like are saying it should.
Since there is not event in the quote, I didn’t try setting up anything over there, but in my dashboard I created an after form load event and used the “disgusting string” to update my filter data view. I get nothing. I also tried throwing the string to a message. I just don’t see anything passed in.
@genoah.martinelli is correct. You shouldn’t need anything from the “sender”. The context menus act as an “Open With” and will pass the row’s key value automatically.
On the Receiving dashboard, you’ll need an event to catch and parse it where you want it to go. The trouble is determining the right level of session, context, valueIn, blah blah blah.
This is what I do… sorry, but its a multi-step process because Preview mode doesn’t get you there (I’ll demonstrate below).
On the receiving dashboard, you’ll need an event. after window_onLoad or such.
row-update (your target field) with a expression of:
JSON.stringify(session)
PREVIEW
Error…
Well, session doesn’t work… so I then test “context”:
JSON.stringify(context)
PREVIEW… no error… and I get results! BUT… In Preview, the results don’t tell us much.
If you do this in preview mode… you’ll see:
Not too useful. But… we’ve learned context.initialValueIn is the first bit!
I’ll go ahead and publish that layer. Then I’ll send it an actual “open-with” request from my context menu.
In my example, I’m right-clicking a job number and it automatically sends the JobHead.JobNum value to my dashboard.
So, in the published dashboard, when I use the open-with context menu, I can see the actual structure (and value) coming in.
So… this tells me I need context.initialValueIn.ValueIn
So… I then go back to my dashboard in App Studio… and I can use that expression:
Save and Publish that change… then test my context menu again.

Okay, that all makes sense, but I’m not seeing any event run when I launch the context menu. I get nothing.
Oh my goodness! I just needed to clear my cache/restart my session.
It works great!
Try….
console.log(context) and watch a little magic in the debugger.
Definitely a lot cleaner to look at. Preview mode still doesn’t provide the ValueIn portion. You still have to publish and send it a real value in order to see the settings.
But still a nice improvement! Thanks @klincecum











