Select to view content in your preferred language

Can a Smart Form I configured be saved as a file?

1007
3
Jump to solution
10-02-2023 07:47 AM
StaciMcLaughlin
Occasional Contributor

Hello,

I have been working on configuring Smart Forms for Asset Inspections in my Web Map. I was seeing if there was a way to save the form as a file. This way I can bring this way I can copy the file location into an existing script.

This is an example of one of my forms below: 

StaciMcLaughlin_0-1696258014634.png

 Thank you!

1 Solution

Accepted Solutions
JustinReynolds
Frequent Contributor

Hi Staci,

It is definitely possible.  We save all of our forms as JSON files and maintain them in using Version Control (GIT).  There is no button that will enable you to export to a file.  There are two ways that we go about it.  

  1. Using ArcGIS Assistant we can access the JSON of a web map or layer, then we copy and paste into our file... in this case a JSON file.
  2. Using the Python API, you can access the map or layer definition and pull out the Form JSON and save it to a file.

Our standard workflow is to create a template form using Field Maps Designer, save the from to a JSON file in a code repository, then any time we publish a feature layer to AGO or AGE from a template we then use the ArcGIS Python API to apply that template Form.

- Justin Reynolds, PE

View solution in original post

3 Replies
JustinReynolds
Frequent Contributor

Hi Staci,

It is definitely possible.  We save all of our forms as JSON files and maintain them in using Version Control (GIT).  There is no button that will enable you to export to a file.  There are two ways that we go about it.  

  1. Using ArcGIS Assistant we can access the JSON of a web map or layer, then we copy and paste into our file... in this case a JSON file.
  2. Using the Python API, you can access the map or layer definition and pull out the Form JSON and save it to a file.

Our standard workflow is to create a template form using Field Maps Designer, save the from to a JSON file in a code repository, then any time we publish a feature layer to AGO or AGE from a template we then use the ArcGIS Python API to apply that template Form.

- Justin Reynolds, PE
StaciMcLaughlin
Occasional Contributor

This is great, thank you! I was able to save the form to a JSON file using Visual Studio Code. I appreciate the quick responce too!

 

DougBrowning
MVP Esteemed Contributor

Good Idea.  This would be handy to build 1 form then reuse it for each of our 11 states.  Would also be good for backups.  If we lose a map now we have to start all over.  Also would be great to reuse the form for the next year of collection vs having to start from scratch.

Depending on your use case the save to the layer option may work for you.  Then the form is with the layer vs the map.