Experience Builder Tips and Tricks - Page 2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Latest Activity

(68 Posts)
JeffreyThompson2
MVP Frequent Contributor

A few months ago, I asked for submissions to this blog stating that I was almost out of ideas. Well, this is it. This is my last idea. So, if you've got something, please help out. There is a reason this is the last post. It kind of doesn't belong here. It's really belongs on the JavaScript API Tips and Tricks Board, but that doesn't exist...yet. (Don't look at me. I'm not starting it. But if someone wants to do it, I'll play along.) But as I often say Experience Builder is mostly just a skin over the JavaScript API and this tip can be accomplished either with or without code.

And, this tip is not just for Developer Edition. There is at least some Enterprise users that may also find this useful. For many functions in Experience Builder, you will need to use Feature Layers, but for many reasons you may want to use Group Layers or Map Image Layers. In some versions of Enterprise, there is a bug that prevents you from accessing Feature Layers in various settings of Experience Builder. If you have encountered this issue, you may find it useful to hybridize your layers, shadow loading a Feature Layer to use for these Build Mode setting while showing your end users the Group or Map Image Layer. If you are on a recent version of Enterprise or Online Edition, you can stop reading now. This tip is not for you.

A quick primer for those who may not be familiar with the difference between Feature Layers and Map Image Layers. Feature Layers render client-side and transmit all their data to the end users computer which allows for Experience Builder to do stuff with it. Map Image Layer render server-side. The power of server-side rendering makes Map Image Layers faster in most circumstances. It also allows for more complex symbology and labels. The server-side labeling engine will also dynamically reposition labels as the end user moves around the map which is super useful for big polygons and long polylines. If you're not sure what kind of layer you have, a quick test is to look at the end of the URL. If you see MapServer, it's probably a Map Image Layer. If it ends in a number, it's probably a Feature Layer.

Map Image Layers can also contain sublayers and those sublayers can be Feature Layers. The way Experience Builder is designed to work, you first build a webmap preloaded with all the layers you want to use which you then pull into Experience Builder to use as data sources. And if that's how you load your data, this is your stop. You can get off the bus now. You are already using hybridized layers. But if you're a bad boy who doesn't always play by the rules and you like loading your data at runtime, say through a fancy custom widget, keep reading, the introduction is finally over.

Who's still on the Vangabus? We're going to Hybrid Layer Town!Who's still on the Vangabus? We're going to Hybrid Layer Town!

To the five people still reading this, you're cool. Let's do this.

There are at least four different ways to mix together Map Image Layers and Feature Layers. Each of these is useful in some way.

Map Image Layer With A Hidden Feature Layer - No Code

If you're one of those Enterprise people mentioned earlier, this is the method for you.

  1. In the Web MapViewer, add a Map Image Layer and a Feature Layer for whatever sublayer you need a data function for.
  2. Using the options in the Web Map Viewer, turn off Visibility, Show In Map Legend, and Enable Pop-ups.
  3. To also hide the Feature Layer from the Map Layers List, use the Map Layers Widget, not the Layers Tool, as the Map Layers Widget offers the option to hide layers.

Not everything will function exactly the same using this method as if you only had a single unified layer. The most troubling thing here being if you have say a Filter Widget , the user may see data in some other Widget that should be filtered out. But Actions like Zoom To, should still behave in a reasonable manner and this is kind of the best you can do in Enterprise.

Enterprise people please get off the bus. Save yourself. Only true madness and coding lies ahead.

Feature Layer With Map Image Layer Labeling

In my project, I have a road layer that I know users will almost never turn off. I need the advanced labeling of a Map Image Layer, but I also need to dynamically load and unload a Feature Layer. This is where I use this flavor of hybrid layer.

  1. In the Web MapViewer, add a Map Image Layer containing the layer you want to label.
  2. If there are any other sublayers in the Map Image Layer, remove them.
  3. With the sublayer you will get your labels from, turn off Show In Map Legend and Enable Pop-ups and make sure Enable Labels is turned on.
  4. In the Properties Tab, go to Appearance and find the Transparency slider. Slide that thing all the way to 100% transparent. At this point, your Map Image Layer should only be labels for the specific sublayer you want to label.JeffreyThompson2_0-1735828677797.png

     

  5. In Experience Builder, use the options in the Map Layers Widget to hide this labeling layer.
  6. Dynamically load a Feature Layer of the same data.

So, you could stop there and the only code you would need to write is adding a Feature Layer to a Map Widget. But...That won't work very well. You will get too many labels, as there will be labels from both the Map Image Layer and the Feature Layer and when the user turns the labeling or visibility of the Feature Layer, the labels from the Map Image Layer will still be there. But, we can fix these issues with some code. Let's address the over-labeling problem first.

A Feature Layer contains a boolean labelsVisible property, so when loading the Feature Layer set it to false and done. Nope, that won't work. At least, it won't if you give your end user a Map Layers Widget. This will turn off the double labels when it loads, but the user can just turn them back on again and with what we are going to do a little later, it will throw the Hide Labels Button out of sync. We need to alter the labels themselves. Feature Layers get their labeling info from a property appropriately called labelingInfo, this is an array of objects to support multiple label classes in a single Feature Layer. So, we can set this to an empty array... and it's not that simple either. Experience Builder rather sensibly interprets this empty array as the layer not having any labels and takes away the Hide Labels Button. We need to trick Experience Builder into thinking the Feature Layer is labeled when it actually isn't. We can do that with some code that looks like this...

 

 

featureLayer.labelingInfo = new LabelClass([
  {
    labelExpressionInfo: {
     expression: ' '
   },
   symbol: {
     type: 'text',
     color: 'black',
     font: {
        family: 'Noto Sans',
        size: 7,
        weight: 'normal'
     }
   }
  }
])

 

 

(I'm not certain if the symbol property is strictly necessary. I'm also not sure if the labelExpressionInfo can be '' without the space inbetween. If anyone tests this out let me know how it goes.)

With a empty space in the labelExpressionInfo, Experience Builder says, "Ah yes, it is very important I label this layer with empty spaces." and you get your Hide Label Button.

Now, we need to address how we hide the labels from the Map Image Layer. For this, we turn to my good buddy, the reactiveUtils.

 

 

const imageLayer = jimuMapView.view.map.findLayerById('idOfMapImageLayer')
//Watch for when the Map Image Layer loads and then add reactiveUtils to the Feature Layer
reactiveUtils.watch(() => imageLayer?.loadStatus === 'loaded', () => {
	if (imageLayer) {
		const featureLayer = jimuMapView.view.map.findLayerById('idOfFeatureLayer')
//Watch the labeling and visibility properties of the Feature Layer and hide the Map Image Layer if either are set to false.
		reactiveUtils.watch(() => [featureLayer?.visible, featureLayer?.labelsVisible], ([visible, labels]) => {
			if (visible && labels) {
				imageLayer.visible = true
			} else {
				imageLayer.visible = false
			}
		})
	}
},
{
	initial: true
})

 

 

Because the only thing in the whole Map Image Layer is just the labels of a single sublayer, we can just make it invisible if the Feature Layer is invisible or unlabeled. I've used other variants of this method with multiple sublayers in my Map Image Layer, which makes it slightly more complicated, but I'll leave that for you to work out for yourself. Also, if I was being thorough, I would add a reactiveUtils to monitor the definitionExpression of the Feature Layer and copy it to the sublayer on the Map Image Layer. This would hide the filtered out labels, if the user did any filtering.

Nothing in the Webmap

In this scenario, you want the fancy labeling of a Map Image Layer, but this layer won't be used very often, so you don't want it bogging down your map when it's not in use. Now you need to make a labels-only Map Image Layer using nothing but code. This code should work...

 

imageLayer.listMode = 'hide'
imageLayer.sublayers = [
 {
   //The id here is the sublayer number you wish to bring in as a label. This is the number at the end of the Feature Layer URL.
   id: 6,
   legendEnabled: false,
   listMode: 'hide',
   opacity: 0
 }
]

 

If you use the sublayers property of a Map Image Layer, any sublayer not listed by id will be excluded, so you can use that to filter out the unwanted sublayers while altering the properties of the one you want to keep. Set up your Feature Layer and reactiveUtils as above and you're good to go.

Ginger Rogers Style: A Map Image Layer, But Works Like A Feature Layer

Now, we have come to the true dark arts. Use these powers carefully, as you will be taxing both your server and the user's machine. There are also lag issues where the "feature" won't respond properly because the Map Image Layer has loaded, but the Feature Layer is still processing. This setup will also break the legend in the Map Layers Widget, but not the legend in the Legend Widget.

So, why would you want to do this to yourself... Map Image Layers support more complex symbology than Feature Layers and you may find complicated geometries draw significantly faster in Map Image form.

We will build an arrangement where the Map Image Layer is displayed unaltered in the map, but the buttons in the Map Layers List are actually from the Feature Layers. Yes, you heard that s correctly. This time I'm going to assume you are adding all the sublayers in the Map Image Layer as Feature Layers. We don't really need to alter the Map Image Layer this time, but we should give it listMode = 'hide'.

So, how do we go about making an invisible Feature Layer? You might think we can just set the layer's visible property to false, but this will disable many map functions, like pop-ups. However, you can alter the layer's renderer, so that it renders invisibly while still being functional. Here's what that looks like for a polygon layer...

featureLayer.renderer: {
    type: 'simple',
    symbol: {
        type: 'simple-fill',
        color: 'rgba(0,0,0,0)',
        outline: null
    }
}

We should also set the legendDisabled property to true and use the labelingInfo trick from above. And with that, you have a Feature Layer that has no visible presence, but will still trigger a pop-up or be found with a Zoom To.

Next, we make the buttons work by setting up some reactiveUtils.

const imageLayer = jimuMapView.view.map.findLayerById('idOfImageLayer')
reactiveUtils.watch(() => imageLayer?.loadStatus === 'loaded', () => {
	if (imageLayer) {
		const sublayers = imageLayer.allSublayers
		sublayers.forEach(sublayer => {
			const idNum = sublayer.id
			const featureLayer = jimuMapView.view.map.findLayerById(`idBaseOn${idNum}`)
			reactiveUtils.watch(() => featureLayer.visible, (visible => {
				if (visible) {
					sublayer.visible = true
				} else {
					sublayer.visible = false
				}
			}))
			reactiveUtils.watch(() => featureLayer.labelsVisible, (labels => {
				if (labels) {
					sublayer.labelsVisible = true
				} else {
					sublayer.labelsVisible = false
				}
			}))
			reactiveUtils.watch(() => featureLayer.opacity, (opacity => {
				sublayer.opacity = opacity
			}))
		})
	}
},
{
	initial: true
})

This should loop through the sublayers in a Map Image Layer and create reactiveUtils monitoring the visibility, opacity and labeling of each of them.

Backwards and in high heelsBackwards and in high heels

Hey look, you made it to the end. Good for you. I hope some of this is actually useful to you.

more
4 4 744
JeffreyThompson2
MVP Frequent Contributor

I have been asked on multiple occasions for help with registering a custom widget in ArcGIS Enterprise. My answer has always been, "I don't know. My Enterprise is still on 10.9.1." Well, that is changing. We are upgrading to Enterprise 11.3 and now that our testing portal has crossed the threshold into that magic 11.X world that allows for hosting custom widgets, I have hosted some widgets. So, I'm going to walk you through the process and what I learned along the way.

The first thing I did was pull up the official documentation, which was rather good in this case. Ordinarily, I'd drop a link here, but the document is imbedded within Enterprise itself on an internal server. I found it by opening Experience Builder, scrolling down the Insert Widget Pane and hitting the question mark next to Custom. Also, note that the box with the lines on it will take you to the Item Page on your Portal, so if you want to make your own documentation for your custom widget, that would be the way to find it. Nice touch, ESRI.

JeffreyThompson2_0-1732216246603.png

So we have our recipe, what's on the ingredient list?

  • ArcGIS Enterprise 11.0 or higher
  • Administrator privileges on your ArcGIS Enterprise
  • A web server
  • A custom widget
  • Experience Builder Developer Edition
  • Love (I mean it's not specifically needed for this procedure, but everyone needs love, even if they are too big and brave to admit it. If you are feeling low on your love supply lately, don't be afraid to reach out to someone. More people genuinely care about you than you even know.)

Step One: Prepare Your Server

I'm copying in steps 1-4 on the official guide and chances are, you won't have to do them.

1. Enable anonymous access to the virtual directory that is hosting your widgets.

The hosting location must be anonymously accessible.

 

2. Enable HTTPS.

Enable HTTPS access in your web server to avoid creating mixed content. Experience Builder does not allow mixed active content caused by loading HTTP under an HTTPS connection. In addition, your server should have a valid SSL certificate issued by a certificate authority to establish the HTTPS connection.

 

3. Enable Cross-Origin Resource Sharing (CORS).

Experience Builder runs under your portal domain, which may be different from the domain of the web server hosting your custom widget. You need to enable CORS in the web server so that access from your portal domain is allowed.

 

4. Add a JSON handler to your web server.

Each widget consists of a JSON manifest file that describes widget properties. Some web servers do not recognize the JSON file extension by default. In such cases, you need to add it to your server as a new MIME type at the application level or a higher level. The MIME type should have .json as the file extension and application/json as the MIME type.

At this point, I would like to remind everyone, I am not an Administrator. I'm also way dumber than I appear. I'm just a monkey who's really good at knowing which buttons give me bananas and which ones give me electric shocks. I don't know how to get your server set up if it's not done already. But chances are you, or whoever set up your server, already did all of these things, so you can probably start at the next step and if it doesn't work you will need to change something on your server.

Step Two: Compile Your Widget

This is the step in the process that is probably where most people slip up. Here's a truth that might be hard to swallow, that code you wrote that you worked so hard on, will never actually be used by your final application. The code in the your-extensions/widgets folder runs through a compiler converting it from TypeScript and React into pure JavaScript. It is also minified. This is the actual code your application runs and this is the code you will need to host your widget. So, even if you are just downloading a completed widget from the Custom Widgets Group, you will still need to put it through Developer Edition first.

The other way compiling can go wrong is a version mismatch. Each version of ArcGIS Enterprise has a corresponding version of Developer Edition. For ArcGIS Enterprise 11.3, the corresponding Developer Edition version is 1.14. Experience Builder can run widgets written in earlier versions, but it can't handle widgets from a newer version. And this limitation also matters for what version it is compiled in. So if you have a widget that was written in 1.12 but compiled in 1.15, it will almost certainly fail in Enterprise 11.3, but if you use 1.14 as a compiler, it should work.

JeffreyThompson2_1-1732221667439.png

Ok, that's what not to do. What to do? There are two ways to get the compiled version. If you've already built a project and hit Publish since putting the widget in your-extensions. It should already be compiled. (Not sure if you need to use the widget in your project, but I don't think so.) If your widget isn't already waiting for you in the client/dist-prod/widgets folder, stop your Client server and run npm run build:prod on that directory. 

Step Three: Deploy Your Widget

Go to ...fileStructure/client/dist-prod/widgets in Windows Explorer and copy the folder containing your widget. Paste that folder onto your web server. Get the full URL to the manifest.json inside that folder. Open up your Enterprise Portal and go to the Content Tab. Click on Add Item and choose An Application, then Experience Builder Widget. Here is where you should enter that URL to the manifest.json. Finish completing the Add Item Wizard. You don't need me to tell you how to do that, do you?

Now, you'll want to Share it with your co-workers. And I encountered something odd on this step. The first time, I hit the big blue Share Button at the top of the Item Page. For some reason, this duplicated my widget both within My Content and Experience Builder. One version was Private and the other was shared with the Organization. On my other widget uploads, I used the Share Edit Button further down the page and didn't get a duplicate. So use the little button, not the big button.

JeffreyThompson2_0-1732225208526.png

Open up Experience Builder and say hi to your new widget, ready for your whole organization to enjoy.

more
5 0 1,130
Laura
by MVP Regular Contributor
MVP Regular Contributor

In Experience Builder (ExB), the Dynamic Content feature within the text widget allows you to create data-driven, interactive content. While it's a powerful tool, it doesn’t yet offer the same ease and flexibility that ArcGIS Dashboards provides—especially for features like dropdown filters.

As someone who values visual impact and quick, insightful data for users, I’ve integrated indicators into many of my applications. Dashboards’ indicators are far more refined and user-friendly compared to ExB’s options. Esri has suggested that the dynamic content in ExB’s text widget could help replicate the functionality of Dashboards indicators. However, after experimenting, I realized the gap is much larger than I expected. A key limitation is the inability to easily filter Dynamic Content—for example, to only show incidents in “City A” or, in my case, monitor a specific tree species in my city.

To address this limitation, I found a simple workaround: build the indicators in Dashboards and embed them into Experience Builder. Below, I’ll share my process using a real-world example from my city’s Tree Viewer.

Our city is actively addressing challenges with Ash trees and wanted an easy way to track the number of Ash trees left in our inventory. My dataset has a field for species, containing hundreds of different tree types. When I tried to create an indicator in ExB to filter for Ash trees, I realized I couldn’t do it directly. Here's how I worked around this limitation.


Step 1: Create Your Indicator in Dashboards

  1. Open ArcGIS Dashboards and create a new indicator.
  2. Add a filter to isolate the data you want to track. In my case, I filtered for planted trees and every type of Ash tree in our inventory.
  3. Configure the indicator to show the count of Ash trees only.
    • Customize the appearance to highlight the key number in an impactful way.

The result? A perfect indicator showing just the data I needed. This was something I couldn’t achieve natively in ExB!

Here’s what my Dashboards indicator looked like:

Laura_4-1732050217838.png

 


Step 2: Embed Your Dashboards Indicator into Experience Builder

  1. Open your existing Experience Builder project (or create a new one).
  2. Add an Embed Widget to your layout.
  3. Use the URL option in the widget settings and paste the URL of the Dashboard containing your indicator.

Laura_5-1732050240549.png

 


Step 3: Check Sharing Settings

Before you publish your app, ensure your Dashboard’s sharing level matches the intended audience of your ExB app. For example:

  • If your ExB app is public, make sure the Dashboard is shared publicly.
  • If it’s for internal use, ensure both the app and the Dashboard are shared within your organization.

The Result

Now, my Ash tree indicator seamlessly appears in my Tree Viewer application! Users can see the current count of Ash trees at a glance, with the refined design and filtering functionality of Dashboards embedded directly into Experience Builder.

Laura_6-1732050325673.png

 

 

 

more
3 7 1,865
JeffreyThompson2
MVP Frequent Contributor

My first real, released to the world Experience Builder project was called Park Finder. It was designed for the citizens of Arlington to go in click some filters and find out what parks meet their criteria. Let me give you a quick tour and explain a little about how I made it.

JeffreyThompson2_0-1731692483226.png

In the lower right of the map, is a custom widget for switching between two basemaps made by importing the Basemap Toggle Widget from the Javascript API. At the time I was working on this project, the Experience Builder Basemap Gallery Widget did not exist and the Basemap Tool had too many choices. Plus, there is a simple elegance to how the Basemap Toggle works. Could I have used multiple maps within my Map Widget to achieve the same effect? Yeah, I guess so, but it was easier to just make my own Widget than to configure multiple maps and all the Actions to make it all work. All in all, I'd rate this custom widget as technically reproducible in Online, but it would be nice if it was a standard widget.

Now, let's look at the right side of the screen. Up at the top, there's a search bar, but it's not actually a Search Widget. It's a List Widget, but I've used CSS to hide everything but the search bar. I don't entirely remember why I did it this way, but I think it was mostly about that annoying Results Panel that wouldn't go away after a search. As of a few days ago, that Results Panel is now optional. So, I'll mark that design as functionally replicated in ArcGIS Online.

Moving down the right-hand column, we get to the filters. The first set of filters are tied together with an OR statement and are using geographic labels in the data to filter by area. Down below, we have filters tied together with an AND statement that allow the users to filter by the amenities the parks have. So of course, I needed to use a custom widget to make such complicated filters, right? No, those are just OOTB Filter Widgets. Ok, not quite. I did use some CSS to make the buttons closer together and change the highlighting color when they are selected. But, functionally they are just two Filter Widgets.

Shortly before we went live with this application, someone in the Parks Department asked if the filters could filter themselves as the user made their choices. At the time, the answer was no. And it was deemed too much work for me to make my own filter widget and re-build the entire application around it, so that idea didn't happen. But now, yes, filters can filter themselves. So all-in-all, I wish the Filter Widget had some more design options, but it's at least advanced functionally.

Now, let's look over at the left side of the screen. That List Widget is not a List Widget. It is a built from scratch custom job. Mostly so I could make those little icons that show what amenities each park has. Until we get an option to put a List Widget inside another List Widget, an idea that is never going to happen because it would be an absolute nightmare to code with a billion possible unintended consequences, that isn't going to be possible in ArcGIS Online.

Across the top of the custom list are a set of buttons that sort the list in several different ways. And finally, after all that introduction, we are finally getting to what this post is really about. While I was working on this application, the first version of Near Me was released. The release of this application was actually delayed so I could incorporate Near Me into the design. And then, I didn't. It just didn't work in this design. Instead, I built my own geographic sort, an incredibly complicated process that I never fully got all the bugs out of.

I've written about what I really wanted out of Near Me before and how with later updates, it became possible. If you haven't read that post before, I'm going to need you to do it now. The rest of this post is going to start where that one left off and won't make much since without that context. Go on...I'll be here when you get back.

skull-fall.gif

Ok, you're back. So at the end, I said:

The big downside is that I can't find a way to make my List Widget a list of all parks in absence of a Near Me search.

Well, there is sort of a way around that now. We can put our Near Me Output List into a Sidebar and have it open when the Search Widget is used. The Sidebar would physically cover a second List Widget that contains all the parks. This second List Widget would have been the one displayed when the app opens. The net effect is that the app appears to have one List that handles both all parks and nearby parks. Hey, why did I use the past conditional grammatical tense back there? Did it not work? No, it works. It's a viable build, but it's not exactly the one I stuck with. See after making the one List over the other, I couldn't stop there. I had to test out the filtering filters which exposed a flaw in that design. If the user changes the filters after Near Me does its thing, it won't trigger Near Me again and the List will not match the filtering criteria. So in my final proof-of-concept application, I made it so my Near Me Output List covered the Filter Widgets instead and I have an always displayed "All Parks" (But Not Really All Parks Because Its Affected By Filters) List Widget and a "Closest Parks" List Widget that only shows up when Near Me is triggered. So if you want that single List feel, it will be similar to, but not exactly what I'm about to describe building. And now, after all that secondary introduction, we can get to what you really want, the how to part...

I've already put my Output List into a Sidebar. We'll call this the Output Sidebar. I've also previously wired up a Near Me Widget in an unopenable Sidebar (We'll call this the Near Me Sidebar.) and set it up so Near Me is triggered by the Search Widget.

We'll start making our changes in the Search Widget. In the Action Tab, I have added a Open Sidebar Action to my existing Record Selection Changes Action to open the Output Sidebar. I also deleted the Zoom To Action I previously configured. Apparently, in the last update, a default zoom action was added to Near Me. Having a zoom action on the Search Widget and Near Me was causing a nauseating bouncing effect as the Search Widget first zoomed in then Near Me zoomed back out a bit. In the Content Panel, I scrolled down and opened up the Search Result options to use the new option to turn off the Result Panel. I will be putting the Search Widget under the Output Sidebar later and turning off the Result Panel prevents a visual glitch where the Result Panel clips through the Sidebar.

JeffreyThompson2_0-1731947732966.png

In the Map Widget, I went to the Style Tab and added 400px spacing from the left and right side of the screen. My map is now centered with space on each side for more stuff. Into the empty area on the right, I dragged a Column Widget. I used the Full Height option and manually set the Width to 400px and gave it a Background color to match my Theme. Then, I hit the Snap To Right button. Next, I used the Duplicate button to copy my Column and used Snap To Left on the new Column. In the right Column, I added a Text Widget to make a heading and a new List Widget to display a list of all the parks.

In the left Column, I assemble a delicious parfait with Text Widgets to make headings, my previously configured Search Widget and two Filter Widgets.shrek-donkey.gif 

I set up some filters using our filtering filters trick. And at this point, I must ask you not to judge my "final" application too harshly. This is a proof-of-concept, not a real application. There are design choices I would not make in a real application. I haven't even looked at anything but the Desktop view. And most glaringly, my data isn't really configured to take advantage of the filtering filters properly.

Almost done, I promise. Go to the Output Sidebar and set the Size to 400px, Overlay on, Resizable off, Default State Collapsed and Collapse Button off. I also gave the Left Panel a Fill color to match our Theme. This prevents the Output Sidebar from being see-through and showing the filters below. With these options set, there will be no way for the user to interact with the filters while looking at the Output List, preventing the inaccurate data issue discussed above.

JeffreyThompson2_0-1731950494870.png

Ok, so the user has set their filters and typed their address in the search bar. The nearby parks have been found by Near Me and sent to the Output Sidebar that is no preventing them from changing any more filters and now what? They're stuck. There's nothing more they can do with this application. So, let's give them a Button to close the Output Sidebar and get back to the controls.

Temporarily drag the Output List out of the Left Panel of the Sidebar Widget and drop a Column Widget in its place. Make the Column Widget Full Size. Add a Button Widget and another Text Widget for a heading into the new empty Column and drag the List Widget back inside. In the Button Widget, go to the Action Tab and Add A Trigger > Button Click > Output Sidebar > Toggle Sidebar. You'll also want to give your Button a meaningful Text value.

All this is to say, Experience Builder has come a long way in the last 18 months. Maybe it's not easy or intuitive, but there is a viable no-code path to re-creating an application that took some serious coding not that long ago. So, has ArcGIS Online caught up to Developer Edition? No, not really and it never really will, but the fact that it's a question is seriously impressive.

more
0 1 517
JeffreyThompson2
MVP Frequent Contributor

Back in June, when ArcGIS Online was last updated, I went through the update notes and wrote about what I thought were the most impactful changes to Experience Builder and what you might be able to do with them. Well, you guys seemed to like that, so I guess this is a regular feature now. As before, I will not try to document every change. If you want that, the official What's New Page is here. And I have done very little testing, so don't blame me if something doesn't work the way I say it does.

Honestly, I feel a bit underwhelmed by this update, which is weird because this update contains five of the most commonly requested updates on the Ideas board (and maybe a small something from one of the Ideas I posted): text support in the Draw Widget, Express Mode for making app creation simpler, users can build their own SQL queries in the Filter Widget, starting an Edit session from a popup, and de-selecting a feature with Zoom To on can un-zoom. So why am I unimpressed? I don't know. Maybe, it's because Batch Editing got pushed back to the next update. Or maybe, I'm just bitter that ESRI is going to make Experience Builder too easy and put me out of business? I don't get paid for this. That should be a good thing. Anyway, if you aren't seeing your chance at international fame slipping away in front of your eyes, you should be happy about this update.

Action Updates

  • Edit Action - This new action allows for starting an edit session from another Widget, including popups in the Map Widget. My understanding of this update is that if you place an Edit Widget in a Widget Controller, editing is turned on and off automatically when the Edit Widget is opened or closed. Last week, @ZachBodenner showed us how to use multiple Edit Widgets to prevent accidental edits, now we can use Widget Controllers to take that idea a step further and make our data even safer from whoopsies.
  • View In Table Action - A Table Widget can now target itself, meaning you can select stuff in one Sheet and send your selection to a separate Sheet.
  • Some Message Actions now prompt you to select trigger data. - Honestly, I'm still struggling figuring out what this means and how to use it. But I think, it means you can choose for some things to not have a certain Action.
  • Show On Map Action - The graphics generated now appear the the Layers Tool and Map Layers Widget, where the user can find them to hide them more easily than that tiny trash can. The tiny trash can still exists as well, but you know maybe it shouldn't, maybe we could design this better, ESRI? The Map Widget also has a new Set As Operational Layers option that will turn them into real boys Feature Layers.
  • Zoom To and Pan To Actions - Un-selecting a feature can optionally return the Map Widget to its default extent. Use this with caution: I tried it for a bit and I did not like the way it felt as a user.
  • Widgets in the Pending List cannot be targeted for Message Actions. - Should make setting up an application for multiple screen sizes less confusing, but I worry about unexpected behavior if the screen-size changes.

Data Source Updates

  • Support for Subtype Group Layers.
  • In the last update, the Feature Info Widget got an upgrade that automatically added all the layers from a Map Widget at once, this option is now available in every Widget that would benefit from it.

Express Mode

Instant Apps for Experience Builder. Templates designed to get you from start to finish much faster and easier with a simplified Builder Mode. You can start in Express Mode and then go to the full-featured version if Express Mode isn't enough. Official introduction blog post here.

Style Settings

Borders for the sides of Widgets can be set separately. Want a line between Widgets in a Column? Throw a top and bottom border. No need to mess with a Divider Widget.

URL Parameters

Use URL parameters to select some features and zoom to them. You can select features by id, geometry or with a SQL where clause.

Widget Updates

  • Accordion Widget - It's a new. It allows you to stack multiple Widgets into a menu that the user can open up when they need it. Much like musical accordions, design accordions are often hated. Design experts caution against using Accordions as they are not good for accessibility and users frequently do not notice/understand they can be expanded. The general rule of thumb is to never hide vital information inside an Accordion. With that said data-heavy/GIS applications, often need to break general principles of web design to be useful. Use Accordions with caution.
  • Basemap Gallery Widget - Add your own basemap by URL.
  • Bookmark Widget - More options for how your Bookmarks appear with a reportedly more user-friendly Builder interface.
  • Business Analyst Widget - More options for calculating travel times.
  • Coordinates Widget - I can't quite wrap my head around what this sentence means, but I pretty sure its important.You can use the new Use transform forward setting to specify whether you want to perform a datum transformation in the forward or reverse direction.
  • Chart Widget - So many updates it needs a submenu. If only I had an Accordion...
  1. Use the layer symbology to color a chart.
  2. Bar and column charts support time binning.
  3. Line charts can be continuous or discrete.
  4. You can turn off axis labels.
  5. You can hide empty data.
  6. Auto generated titles that can also be changed manually.
  7. Breaking Change Alert!

Additionally, the Chart widget no longer supports using ID fields for statistics other than count. If you have an existing chart that does this, the chart may fail and you should reconfigure the widget.

  • Draw Widget - Text!!!!!!!!!!!!!!! With many font choices, the OOTB Draw Widget is now officially a better Write On A Map Widget than my uninvited collaboration with @RobertScheitlin__GISP. (Although, we still have the official widget beat with freehand drawing and post-drawing editing support.) Drawn graphics can also appear in the Map Layers Widget or Tool.
  • Edit Widget - Enable Tooltips can be turned on by default. (Could help fill the gap left by the WebAppBuilder Traverse Widget?) Show and edit vertices. (Is that really a new feature? We didn't already have that?)  Hide Edit/Create Features panels to the user if not using them.
  • Filter Widget - Users can take control of their own destiny and make their own SQL queries.
  • Map Widget - In addition to other stuff mentioned in other places, you can also choose where to dock docked popups.
  • Map Layers Widget - Popups can be toggled on/off on a layer by layer basis. Users can turn off popups for that one layer that super annoying and not very helpful, but covers your entire map.
  • Near Me Widget - View Related Records in Near Me. Find intersecting polygons. Find features in invisible layers. Cancel slow searches. More Data Action support. Sounds like Experience Builder's most hackable Widget just got even more hackable.
  • Query Widget - Query spatially with stuff added from the Add Data Widget.
  • Search Widget - Should be easier to set up for new Experience Builder designers, but I paradoxically if you know what you want and what your doing, it seems to be a clunkier building process. Every step through setting up a Search Widget answer I have ever written is now wrong. The Result Panel that covers up half your screen and doesn't hide itself after a search is now optional.
  • Text Widget - Additional formatting options.
  • Timeline Widget - Increased precision and an option to start with filtering on or off.
  • Widget Controller Widget - There are new options for when there are too many Widgets for your Widget Controller Widget to control all your Widgets. They can be scrolled through with arrows or have the overflow compacted down to a single button. Making a Widget Controller one button wide and using this second option could be a valid design choice. The Manage Widgets Panel allows you to make an Accordion within a Widget Controller. It's not mentioned in the What's New document, but the took my advice and added box shadow options to the buttons. I would have preferred that they listened to the border and bigger buttons parts of that suggestion instead. You can also make the icon colors different for every Widget in the Widget Controller. Don't do that. But you can do that.

There it is. My most highlights from the November 2024 ArcGIS Online Experience Builder Update. Have a great day to everybody, except whoever spilled their coffee on the ArcGIS Online servers this morning.

more
7 3 661
ZachBodenner
MVP Regular Contributor

This little trick will help tame some of the complicating features of the new Edit tool and create a safe location for editing small numbers of attributes.

Read more...

more
6 1 318
JeffreyThompson2
MVP Frequent Contributor

I want to make a tool where users can select one or more counties and easily see the calculated total area. So I added a Text Widget, turned on Connect To Data, found my Counties layer, and switched to the Selected Features View.

JeffreyThompson2_0-1730380042086.png

With the Text Widget selected, I clicked the stacked circles to make some Dynamic Content. In the Statistics Tab, I select the Sum Operator and the Field containing my area. Every polygon is required to have one, and by default, this usually looks like SHAPE.AREA().

JeffreyThompson2_1-1730380740230.png

I hit Insert and it works. The user can use the Select Widget or the Select Map Tool to pick some counties and instantly know their area. But, when they don't have anything selected, it looks like this... 

JeffreyThompson2_2-1730380778726.png

Bad, ugly. We can do better.

Instead of using the Statistics Tab, go to the Expression Tab. And here's the trick, that unlabeled text area above the unlabeled text area where you write your Expression, that's what gets displayed when nothing is selected. So I make my Expression like this...

JeffreyThompson2_3-1730381295276.png

And here's how it looks when nothing is selected...

JeffreyThompson2_4-1730381380491.png

more
4 0 391
JeffreyThompson2
MVP Frequent Contributor

I'm just going to put a link here to this epic comment by @fpolia21. Take an Experience Builder project from Developer Edition and register it as an Online or Enterprise Item. Or download it from your Online/Enterprise and edit it in Developer Edition. 

https://community.esri.com/t5/arcgis-experience-builder-questions/deploy-exb-developer-edition-to-po...

more
1 0 459
JeffreyThompson2
MVP Frequent Contributor

I've done something rather silly, but also possibly useful. I'm just going to put this idea out into the world and you can decide if you want to do something with it. I did this more to see if it was possible than being convinced it would be helpful. Combining a Sidebar Widget with multiple Section and Button Widgets, you can build your own version of a Widget Controller.

This method relies on several new features from the ArcGIS Online June 2024 Update, so it is not currently possible in any version of Enterprise. It's a little bit of a brain-melter to set-up. Certainly more of a hassle than using the OOTB Widget Controller. But, I do see the following potential advantages:

  • Placing your widgets in a Sidebar might be more aesthetically pleasing in your design than the Panel options provided by the standard Widget Controller.
  • Far greater design and placement options for your buttons than the Widget Controller provides. That ugly thing that some of you really seem to like from WAB where all the buttons are different colors, you could do that. Don't do it. But you could do it.
  • The ability to open/close multiple related Widgets simultaneously. For instance, the user might want to view both the Map Layers and Legend Widgets at the same time.
  • The last ArcGIS Online update brought us an Action to open a Widget in a Widget Controller, but not a Close Widget Action. This method could simulate that missing function.

Some key concepts behind this build:

  • A Button Widget placed in a Section Widget can control the Section Widget it is placed in.
  • The Set Link Option can control multiple Section Widgets at the same time.
  • The Button Widget (and only the Button Widget) has access to both the Set Link Option and the Button Click Action. It can do both simultaneously. 

With all that preamble, let's get into this stupid, maybe useful build.

Step Zero: Add a Sidebar and Map Widget

Add a Sidebar Widget. Set the Default State to Collapsed and turn off the Collapse Button.  You could set the Default State of your Sidebar to Expanded, but you would have to configure the Sections later on so that the default widget is set up to close itself. (That sentence should make sense later.) Removing the Collapse Button is important so that your Actions will not fall out of sync, as they would if the user clicked the Collapse Button. I will also add a Map Widget to the always open side of the Sidebar and connect it to a webmap. The map isn't really part of this build, it and the Widgets in the Sidebar are just here for the aesthetics.

Step One: Make A Button That Can Change Itself

For my demo, I will make a controller for three Sections in the Sidebar: one with a Map Layers and Legend Widget, another with a Basemap Gallery and the last with a Bookmark Widget. I will also make some stylistic choices I wouldn't do in an actual application. I will make my Buttons considerably smaller than the Sections they are in. I will make the backgrounds of the open sidebar views white and the close sidebar views black. (In an actual application, I would make the Buttons fill the Sections and the background colors would be irrelevant.)  I will also make the open widget buttons blue and the close widget buttons red with different text for each. (In an actual application, I would make the color variation much more subtle and no text variation.) I would recommend using some clear visual difference like color or text while you are making and testing this build and then changing the style after you have made sure this works. This will get confusing if you don't leave yourself some obvious hints.

  1. Add a Section Widget and make its Fill color white.
  2. Add a Button Widget inside the Section Widget and give it the blue Quick Style.
  3. Use the Duplicate View Button to copy this View with the Button. Rename View to Open Layers and View 2 to Close Layers.JeffreyThompson2_0-1730131208602.png
  4. In the Close Layers View, change the Fill color to black and apply the red Quick Style to the Button.
  5. In the Content Tab of the red Button, Set Link to a View then select the Open Layers View and change its Text to Close Layer Information. JeffreyThompson2_1-1730133100160.png
  6. In the Action Tab of this red Button, add a Button Click > Sidebar > Toggle Sidebar Action.
  7. Go back to the Open Layers View and select the blue Button.
  8. In the Content Tab, change the Text to Open Layer Information and Set Link to View > Close Layers.
  9. In the Action Tab, add a Button Click > Sidebar > Open Sidebar Action.

So that was a bunch of steps and what did we get out of it? A Toggle Sidebar Button that changes its color and text. Worth it on its own? Probably not. What else could you do with a Button that changes its own function?

  • Guide users through a specific workflow.
  • Guide users through an interactive slideshow, StoryMap-type experience.

Let's keep going and finish making our own widget controller.

Step Two: Add Some Stuff In the Sidebar

  1. In the collapsible side of the Sidebar, add a Section Widget and make it Full Size.
  2. Make two new Views and rename our Views, Layers, Basemaps, and Bookmarks.
  3. In the Layers View, add a Column Widget (for neatness) then put Map Layers and Legend Widgets inside the Column.
  4. Add a Basemap Gallery Widget to the Basemaps View and a Bookmark Widget to the Bookmarks View. (I selected the third bookmark template and switched its Direction to vertical.)

We now have some Widgets to control. Now we need to make the buttons.

Step Three: Make The Buttons

  1. On the Section Widget, hit the Duplicate button twice. This should make two additional copies of the Section Widget, including all the Views, Buttons and Actions we have already made. JeffreyThompson2_0-1730141488455.png
  2. In the new Section Widgets, rename the Views to Open/Close Basemaps and Open/Close Bookmarks.
  3. In the Section Widget with the Buttons for controlling the Map Layers and Legend Widget, click on the blue Open Layers Button.
  4. Click Set Link and set it with Close Layers, Open Basemaps, Open Bookmarks, and Layers. This set of links should switch the Layer Button to the close Action, get the Bookmarks and Basemaps ready to be opened, and open the Sidebar to the Section containing the Map Layers and Legend Widgets.JeffreyThompson2_1-1730142347672.png
  5. In the same Section Widget, go to the other View and click on the red Close Layers Button. Ensure that the Set Link is set to Open Layers and all the other Sections are blank. Note: If you have followed along, you shouldn't actually have to do anything on this step. This link should already be made for this View.JeffreyThompson2_2-1730143089422.png
  6. In the Section Widget for the Basemap Buttons, go to the blue open Button and change the Text to Open Basemaps.
  7. Change the Set Link Options to this pattern: the Sidebar Section to the widget you want to open, the Section containing the Open Button to the Close Button View, and the other Button Sections to the Open Button Views.
  8. Switch to the Close View and click on the red Close Button. Change the Text to Close Basemaps. In the Set Link Options, set it so that its own Section goes to the Open View and all other Sections are blank.
  9. Repeat steps 6-8 for the Bookmarks Buttons.
  10. Save. Go to Preview Mode and test. You should be able to click any of these Buttons in any arbitrary order and get a logical response. At any given time, you should see the Sidebar closed with three blue, open Buttons or the Sidebar open with the selected Button in the red close Button state, the correct Widget open, and the other two Buttons in the blue open state.JeffreyThompson2_3-1730144504928.png
  11. Fix up your presentation. I'm leaving out the details here, but here's how it looks after a little re-design.JeffreyThompson2_4-1730145569444.png

I'm sorry if that is the most confusing thing you have ever read. I tried my best. Let me know if you try this out in a real application or one of the other suggestions for a self-controlling Button. Do you have any other uses for a self-controlling Button?

more
1 1 694
JeffreyThompson2
MVP Frequent Contributor

Last week, we took the Experience Builder project from the Make an Impact with Modern GeoApps MOOC from drab to fab. But @AndreaB_ wasn't satisfied with the way the fact that the observations in the Feature Info Widget don't filter by the map extent. And she's right, adding in some Actions could make this app an even nicer user experience. So let's do that.

I am going to set up Actions so that the data in the Table and Feature Info Widgets only show what is currently in the Map Widget. I will be using two different methods, an easy way and a more complex way involving a Data View. We will start with the easy way on the Table Widget.

The Easy Way To Filter By Map Extent

  1. Go to the Map Settings Panel Action Tab.
  2. Add an Extent Changes > Filter Data Records > Native Vegetation Action. (Native Vegetation is the name of the layer used in the Table Widget.)

JeffreyThompson2_0-1729706677045.png

That's it. The Table now filters itself every time the Map changes. Let's make it harder on ourselves...

Filtering By Map Extent With A Data View

  1. Go to the Feature Info Widget Settings Panel Content Tab.
  2. Click Observation. (That is the name of the layer used in this Widget.)
  3. Open the dropdown menu under Observation and select Create A View.JeffreyThompson2_1-1729707075044.png
  4. In the window that pops up, Add A Clause and set it to something that will not filter anything. OBJECTID is not blank should do the job of not doing anything.
  5. Change the name of this Data View to Map Extent to clarify why it exists.JeffreyThompson2_2-1729707458581.png
  6. Apply Changes. Then, open up that dropdown menu under Observation again and select Map Extent.
  7. Go back to the Map Settings Panel Action Tab.
  8. Click on the Filter Data Records Action I made earlier. Then, click Select Data.
  9. Select Observation to add an additional layer to filter. Then, hit the X button at the top of the Select Data Panel.
  10. This should bring you to the Action Settings Panel. Under Observation, open the dropdown menu and select Map Extent and de-select Default.

JeffreyThompson2_4-1729708498347.png

Now, the Feature Info Widget should filter as we zoom around the Map.

Sequel Bait for a Part Three of This Series to be Written Ten Years From Now When ESRI Offers Me More Money Than I Can Refuse and Ruins the Artistic Integrity of My Work

Was there any point to building that Data View? Doesn't it just do the same thing? Why bother with a ten step method when I could have done it in two?

In this application, as it currently is, creating that Data View was a total waste of time. Making my application more complicated than it needed to be and increasing the chances that I messed up somewhere along the way. But now that I've done it, I could add more stuff to my application that doesn't get filtered by the map extent. For example, I could add a List Widget set to the Default Data View of the Observations layer that would show every animal observed with an Action set up to Zoom To that part of the Map.

Until ESRI destroys it, you can see what this version of the app looks like here.

more
2 0 644
186 Subscribers