Select to view content in your preferred language

Web Map and Web Map Classic Arcade

2258
6
Jump to solution
01-30-2022 07:50 PM
AneteZvaigzneLV
Regular Contributor

Hello! I am not sure if this is the correct Community ''folder'' where to post this, but I have a question relating to the wonderful workflow as demonstrated in this video Inspection Workflows Part 2: Web Map Creation & Dynamic Symbology by @EricWagner1 

Two questions:

1) Is it possible to Access the water utilities Symbology also on the new Map Viewer? I see it neatly in the Classic.. 

2) Is it just me or when using the same method of IIF+DateDiff as to define symbology for points that have been inspected recently and those that have to be inspected - it works only in the Map Viewer Classic? Is it because the Layer View is added to the map? I tried a workaround - created layer view by Join Analysis and added it to the Map Viewer Map. Used the same Arcade that is in the demonstration. Worked great for the Map Viewer Classic Map. Ignores the second part of the expression in Map Viewer.

I would be happy if anyone could give a comment if this is how it's supposed to be for now. 

Cheers! 

 

1 Solution

Accepted Solutions
EricWagner3
Emerging Contributor

Glad we're making progress on the first point! But I think I know the error for the second point, it's a tricky one!

According to your Arcade expression, you have two values, right?
"Inspected more than a year ago"
- "Recent inspection"

Even though you put these two values correctly into the arcade expression, the map still doesn't technically know that these two values exist... until inpsection records are submitted that meet each of the provided criteria (inspection within the last year OR inspection not in the last year).

So, if you built the arcade epxression and all of your inspections are within the last year, you can symbolize everything by "Recent inspection" because the map has data that supports this first part fo the expression. Until you add an inspection record that occured "more than a year ago", the map won't register this value in the symbology and it will ignore that second part fo the arcade expression. However, once you add an inspection record that meets the second criteria, you'll still have to go into the symbology and manually turn on the "Inspected more than a year ago" symbology. But it will work since a record meeting this criteria is available for the arcade expression to consume.

I ran through the symbology workflow and when I had no inspection records submitted, I couldn't use either of your two values. I got a generic "Other" value. I added an inspection record with today's date and was able to add the "Recent inspection" value. Then, I added an inspection record and falsified the date to be three years ago; this allowed me to add the "Inspected more than a year ago" symbology color.

Here's my suggestion: when using an arcade expression like this to drive symbology, create "fake" inspections records that will trick the map to thinking that all of your different criteria are met. This way you can apply your: "Inspected more than a year ago" and "Recent inspection" symbologies.

Finally, it makes sense that the symbology from the Map Viewer Classic pulled into the New Map Viewer. Just like the utility symbology, the New Map Viewer will pull on that Map Viewer Classic's symbology.

View solution in original post

6 Replies
EricWagner3
Emerging Contributor

Hi AneteZvaigzneLV!
Thanks for checking out the videos! To help you out...

1) Unfortunately the utility symbology found in the Map Viewer Classic is still unavailable in the "New" Map viewer. However, it is possible to open a map made with the New Map Viewer in the Map Viewer Classic to apply the symbologies. Once you've added the appropriate symbology, save the map, and then reopen it in the New Map Viewer. The symbology will carry over from the Map Viewer Classic to the New Map Viewer.
I realize that this isn't ideal, but the New Map Viewer is still coming along. I recommend suggesting more symbols in the New Map Viewer using ArcGIS Ideas: https://community.esri.com/t5/custom/page/page-id/arcgis-ideas.

2) To get the time-based symbology to work in a web map (IIF & DateDiff), you need to have the hosted layer view in your web map (this can only be created in the Map Viewer Classic, but can be added to any map that uses the New Map Viewer). That is the layer that needs to have the Arcade expression applied to the symbology. Can you sahre some screen shots of what you have pulled together?

AneteZvaigzneLV
Regular Contributor

Thanks for the (1) tip! It worked for this! + I will make sure to suggest Utilities in Map Viewer symbology. 

As for (2) it gets more interesting. When applying the Classic to Save as Map Viewer technique mentioned in the (1) it did indeed keep the symbology not only for the Utility symbol, but also for the time-based points, however as you will see in the .jpeg I have created it still ignores one part of the expression. Maybe you have the same situation on your side?

The expression used in all of these photos is this simple one (and as you can see it works perfectly in Map Viewer Classic, however not so much in Map Viewer Unfortunately): 

IIf(DateDiff(now(), $feature.ApsekojumaDate, 'years') > 1, "Inspected more than a year ago", "Recent inspection")

0 Kudos
EricWagner3
Emerging Contributor

Glad we're making progress on the first point! But I think I know the error for the second point, it's a tricky one!

According to your Arcade expression, you have two values, right?
"Inspected more than a year ago"
- "Recent inspection"

Even though you put these two values correctly into the arcade expression, the map still doesn't technically know that these two values exist... until inpsection records are submitted that meet each of the provided criteria (inspection within the last year OR inspection not in the last year).

So, if you built the arcade epxression and all of your inspections are within the last year, you can symbolize everything by "Recent inspection" because the map has data that supports this first part fo the expression. Until you add an inspection record that occured "more than a year ago", the map won't register this value in the symbology and it will ignore that second part fo the arcade expression. However, once you add an inspection record that meets the second criteria, you'll still have to go into the symbology and manually turn on the "Inspected more than a year ago" symbology. But it will work since a record meeting this criteria is available for the arcade expression to consume.

I ran through the symbology workflow and when I had no inspection records submitted, I couldn't use either of your two values. I got a generic "Other" value. I added an inspection record with today's date and was able to add the "Recent inspection" value. Then, I added an inspection record and falsified the date to be three years ago; this allowed me to add the "Inspected more than a year ago" symbology color.

Here's my suggestion: when using an arcade expression like this to drive symbology, create "fake" inspections records that will trick the map to thinking that all of your different criteria are met. This way you can apply your: "Inspected more than a year ago" and "Recent inspection" symbologies.

Finally, it makes sense that the symbology from the Map Viewer Classic pulled into the New Map Viewer. Just like the utility symbology, the New Map Viewer will pull on that Map Viewer Classic's symbology.

AneteZvaigzneLV
Regular Contributor

Thank you Eric! I got the ''idea'' and it does make sense! I am with Arcade on this one 🙂 

The symbology works as expected with this fake data trick, however the count of objects still does not. But I can live without that for now! 

May you have a wonderful week! 

AneteZvaigzneLV
Regular Contributor

Hello! It is me and with the same workflow! Different question though 🙂 

I have made the same workflow both Online and Enterprise Portal 10.9.1. Everything looks and works amazing on my Android device in Field Maps when working with ArcGIS Online (in terms of dynamic symbology for HFLV), however when opening Field Maps that comes from Portal the dynamic symbology simply does not exist. 

That is probably connected with the speed of Enterprise Field Maps to catch ArcGIS Online, but I would like to understand is this the expected behavior? Is it a bug? Any Roadmap for when Field Maps will take into account HFLV symbology? As we have created pretty cool solution involving the above-mentioned workflow presented by @EricWagner3 it is essential for us to understand when can we offer this to our Enterprise clients. Maybe you know who from the product team may know this?

Cheers!

0 Kudos
AneteZvaigzneLV
Regular Contributor

Hello @EricWagner3 ! This is a known BUG-000148852 .

0 Kudos