Hi,
I'm trying to use as much dynamic text as I could for our maps. I wanted to get rid of duplicate Township labels and just show 1 value.
Thanks
Apparently fixed in ArcGIS Pro 3.2
Just got this in an email from ESRI.
Updates have been made to the following defect which you are associated with:BUG-000137676 - In ArcGIS Pro, unable to remove duplicates using the Distinct Arcade function in the Dynamic Text tool for table attribute values.Status: Fixed (Learn More)Version Fixed: 3.2Additional Information: This issue is addressed in ArcGIS Pro 3.2.
Just received this update;
"Thank you for your patience as we have investigated this issue. I just wanted to update you on this case. After extensive testing, it does appear that there is an issue with the Distinct function when used in the Table Attributes option for Dynamic Text. We were able to replicate this issue and found that a blank output was returned when applying the Distinct function as outlined in the Esri Community post that you sent through. Because of this, we have lodged a bug on the issue BUG-000137676: Unable to remove duplicates using 'Distinct' Arcade function in Table Attribute Value Dynamic Text in ArcGIS Pro. "
Hopefully see a fix in 2.8!
Support case lodged. Support case lodged. #02745001 Removing duplicate values using DISTINCT arcade function in table value dynamic text not working
@TomBole thanks for that. I'll get onto it and link it back here.
Hi All,
If the DISTINCT function is not working with the Value dynamic text element I would consider this a bug. Can someone log this with Support? It will help us prioritize this.
Thanks,
Tom
I actually posted an idea after looking at this issue here: https://community.esri.com/t5/arcgis-pro-ideas/arcade-function-to-show-unique-values-remove-duplicate-values/idi-p/1028336/jump-to/first-unread-message and got a reply from an ESRI contributor saying that you could use the DISTINCT function to do this - though I fail to see how. My attempt to make it work failed (as shown in the replies).
Hi @Anonymous User ,
I have had similar situation in the past and the only way I was able to achieve was to write a custom printing tool that was published to ArcGIS Enterprise to use and I modified the python script, which provides more finer control. I used a lot of dynamic text elements and changed the values for each of them based on the requirement.
Hope that helps.
Thank you Lindsay Raabe, unfortunately I tried the distinct function and it doesn't seem to work too.
Hi Aubri, thank you for the response unfortunately I am not using map series and this map I'm working on is a general template so users won't have to edit the Map title hence I can't lock it with a query. ☹️
Hi @AubriOtis. How would yo create a filter query that shows unique values only? I've tried and looked and failed to find anything that would do this. I looked at the DISTINCT function but it didn't seem to be available.
Hi!
You should be able to get what you want by changing your query. Instead of visible rows, try using Custom Query to build a query for just the feature you want to show.
Or, if you are using a map series the Map Series Row option will only the value from the map series index layer, not all the other values.
Cheers,
Aubri
If you were only wanting to show 1 value (i.e. 80 but not 79 in your image above), then I'd say yes. I too struggled with this for a while. The solution I found was to add a section of spaces (i.e. " ") to the delimiter field. This essentially added a big gap between the first and second value, resulting in the second value not fitting in the frame. The trick was putting in enough spaces to bump out the next value based on the shortest value you wanted to display (i.e. "Word" instead of "Reallylongword"). If you had enough spaces to fill the gap between two lots of "Reallylongword", but not enough to fill the gap between two "Word" values, you could still end up seeing "Word Word". The other neat little part of this was that the text justification was based on the values displayed (i.e. it would still centre the "Word" and not factor in the delimeter). See below for clarity.
Unfortunately, I don't think this will work for you, as it looks like you have multiple features with the same value (i.e. 80) and therefore, you wouldn't be able to get it to discriminate between values. Arcade doesn't seem to have a solution either (no "remove duplicates" text function which would be really nice to see). I tried using the DISTINCT function but that didn't work either. It returns an array, which doesn't translate into a string, and when I tried to convert the array to a string, it just gave me what we started with.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.