Select to view content in your preferred language

Popup actions??

1413
3
11-08-2018 10:48 AM
KarenEllett
Occasional Contributor

   Is there any way to create a widget that runs from within the popup?  In Javascript we're able to create a custom popup action, but I've seen no way to do it in Portal.... am I missing something, or it's not yet possible?

I have to say, I am seriously disappointed in ESRI's documentation and api for WAB.  I've tried several of their "tutorials" and sample code, only for nothing to work and discover they left out vital steps.  I have to cherry pick from several different samples and blogs to find anything that works. This is really, really poor documentation.

In addition, the developers edition of WAB is... janky... to say the least.  I have to constantly restart and refresh and sometimes it sees my apps and sometimes it doesn't... it's completely blank, as though i've deleted everything and started fresh.  And I can't figure out why sometimes it will see my apps and sometimes it won't. 

ESRI, you had a lot of work to do before this was ready for prime time.

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

What a strange question. The answer would be no. You can add custom actions to a pop up from a widget but not have a widget in a popup.

As far as documentation,yes I have seen some issues int the steps for tutorials but I have not had much issue otherwise.

0 Kudos
KarenEllett
Occasional Contributor

It's not a strange question at all, considering how frequently people use custom actions in popups and how useful they are.  In ESRI's javascript API, they have samples specifically on how to do it.  "The Popup widget may contain one or more actions, or buttons, that allow users to execute a function when clicked."  That's what we need to do.  For instance, let's say I have a customer point.  One of the attributes on customers is "Customer Number."  We have other documents located on our network, associated with that customer number.  I want a button in the popup that, when clicked, grabs the Customer Number attribute for that particular record, appends it to a standard url, (say, http://myserver.mydomain.com/property1=123&customernumber=) and then opens it in another tab.

We have this exact function working in javascript viewers and in silverlight viewers; seems reasonable to want it in portal.  I'd really prefer not to have to design a whole new popup from scratch, but if we can't insert this action into portal's default popup, then we will, but it'd be nice to know how.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Karen,

   OK it was just my confusion with your question.

Is there any way to create a widget that runs from within the popup?

You can create a widget that adds a custom action to a popup.

Create a feature action in your widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for De... 

If you have not seen the above sample then it is exactly what you are looking for.

Just to clarify you are asking about adding this functionality to an On Premise Portal correct? If that is the case the a custom widget is the way to go. If you are using WAB Developer then you could actually add code to one of the jimu core classes like MapManager.js or PoupManager.js witout the use of a widget to add the custom action.

0 Kudos