Select to view content in your preferred language

Editing Experience data sources via JSON and ArcGIS for Python

953
3
05-23-2023 04:57 AM
Labels (1)
MichaelTemchine1
New Contributor II

Hello,
I will use ArcGIS for Python to create feature layers from a registered database and turn those layers into published web maps. I have created templates in Experience Builder and would like to simply change the data sources used in an existing experience without having to recreate it using the GUI. The schema are exactly the same. The only difference is the source.

My use case is an analysis of hospital systems by clinic type (primary, pediatric, etc.). Each clinic type will have an experience. Each hospital system will have three experiences embedded. And then, the state will have an experience where each system is accessible. But to do this I cannot possibly recreate and rewrite all of the queries I have set up for layer, for lack of a better word. The only thing that actually needs to change is the data source.

My attempts to write the JSON with the updated data sources results in a data source cannot be accessed error.

Help is greatly appreciated.

Michael Temchine

3 Replies
bsneller_esrinederland
New Contributor II

I tried using the AGOL assistant for editing the JSON (data) but also no success, although the JSON is changed the XB is apparently not using it. 

0 Kudos
MGEGIS
by
New Contributor II

Use this AGOL Assistant:

AGOL Assistant: https://assistant.esri-ps.com/

Edit the config file, save and then publish from EB or edit both the config JSON and published JSON at the same time to match. The EB editor uses the JSON in the config file which is the same JSON in the published web experience.

I found the answer from here:

https://www.youtube.com/watch?v=MLh1JmF9GVg

 

 

LORAMAdmin
New Contributor II

As stated by MGEGIS, use ArcGIS Assistant: https://assistant.esri-ps.com/

(This is different than ArcGIS Online Assistant).

Only thing I would add and say here more explicitly is that you have to edit the json and then save it to a config.json file. From the link above, you can choose to then import and replace the file at the config/config.json directory for experience builder.

 

LORAMAdmin_0-1719321721346.png

 

0 Kudos