Refresh Embedded Dashboard on Form Event

(Brendan Woodell) #1

I have a UD_Table Maintenance customization with an embedded dashboard in it. The Form serves as an Entry form with the Dashboard pulling the data back in via BAQ.

When I Save the new data I’d like for the dashboard to automatically Refresh so you can see that it’s been added correctly. It’s a little awkward when clicking Save to add the new data and nothing happens. I’ve seen a few questions like this but haven’t found the answer I’m looking for yet.

The toolbar for the dashboard don’t seem to work like the tools on the form itself so ‘MessageBox.Show(args.Tool.Key);’ doesn’t return anything for me. So I’m not sure how to say “Hey I see you’ve clicked the Save tool on the form, go click that Refresh Tool on the dashboard”.

(Chris Conn) #2

if you have an event working already on the save event - you could try oTrans.Refresh();

(Brandon Anderson) #3

Isn’t that what the epiview Notification event is for?

(Brendan Woodell) #4

oTrans.Refresh() doesn’t work. I believe that’s because that’s only refreshing the dataview of the form, which the dashboard is not a part of. The dashboard is on another plane of existence it seems.

IDK what you mean Brandon, I’m not having trouble looking for the event to do something, I’m having trouble looking for the thing that call’s the Dashboard Refresh tool when said event happens.

For example, if I do

AfterClickfunction(args and stuff)
if(args.Tool.Key == “SaveTool”)

that refreshes the UD dataview when I click the Save Button on the form. What I need it to do is Refresh the dashboard, and I don’t know how to get the tool name for the dashboard’s refresh. Targeting the dashboard’s own toolbar is what I’m unsure how to do.