Select to view content in your preferred language

Copy a dashboard and point to a different source

2643
4
Jump to solution
07-26-2021 05:23 PM
JulietK
Frequent Contributor

Hi I've read that it's possible to duplicate a dashboard by using 'view an item's JSON' on AGOL assistant and replacing the code under the 'Data' section. 

I would like to duplicate an existing dashboard and change the source layer to a different map, without losing all the configurations like filters, colours and actions between charts. 

How do I edit the JSON to point to the new map layer as the data source? I've had a look at the JSON code but there aren't any specific sections that stand out to me as being editable to point to a different map. 

Thank you

0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Hi @JulietK ,

Search for the word mapWidget.  Within this section, replace the itemId with the item id of the new web map.  I've had success with this, but not always.

JakeSkinner_0-1627346256994.png

 

View solution in original post

0 Kudos
4 Replies
JakeSkinner
Esri Esteemed Contributor

Hi @JulietK ,

Search for the word mapWidget.  Within this section, replace the itemId with the item id of the new web map.  I've had success with this, but not always.

JakeSkinner_0-1627346256994.png

 

0 Kudos
JulietK
Frequent Contributor

Hi Jake, excellent thank you for that! 🙂

I've just had another similar query come up - I have a hosted feature layer which was automatically created when I published my survey, then I have a number of hosted feature view layers that were created from the main feature layer. I am having to republish the survey due to a fieldtype error (fieldtype was set to date erroneously, but should be integer), which will delete the main feature layer. Is there a way for me to do this, then alter a section in the JSON of the existing hosted feature view layers to point to the newly published hosted feature layer? 

Thank you again

0 Kudos
AlexPage
Occasional Contributor

Good afternoon, Jake

I tried this exactly and, replacing the "itemId" with the id of the other map, and it didn't work. So I replaced it with the original number and saved back again. It said the JSON was valid as well.

Now every single map in the entire organization is not working. What do you think could be the reason?

Thank you for your thoughts on the issue

jgarcia_qk4
Occasional Contributor

Did you ever solve the issue of your entire organization's maps breaking?

0 Kudos