Change order of capture fields in Quick Capture

780
3
Jump to solution
11-30-2023 07:39 AM
EricaNova
Occasional Contributor

I've created a Quick Capture project from the "Rapid Wildlife Reporter" template. When a user clicks on a button to report that they've seen a particular animal - e.g., a moose - there are 2 more fields for users to fill out, "Animals count" and "Field Notes":

EricaNova_0-1701358488607.png

The fields are in the same order in the data view of my hosted feature layer view:

EricaNova_1-1701358574412.png

 

But when I go into the mobile app and press the "Moose" button, the user sees "Enter field notes" before "Count". This happened after I updated to the beta version of the app (1.18.85). I think 1.18 stable release comes out tonight, so I'll try again with that release... but... does anyone have any idea how to change the order of these capture fields?

 

2 Solutions

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

@EricaNova  Starting with version 1.18, the order of user inputs is defined by the order in the project JSON. At this moment in time, you need to go into the JSON and reorder things as you see fit manually. Early in 2024 we want to make it possible to change the order visually (no manual JSON editing needed) in the QuickCapture designer.  Our intent here is to provide more flexibility: changing the order of fields in existing layers can be problematic. Having the order come from the JSON will simplify things.

More details in this announcement: https://www.esri.com/arcgis-blog/products/quickcapture/announcements/whats-new-in-arcgis-quickcaptur... 

View solution in original post

JohnathanHasthorpe
Esri Regular Contributor

In the JSON editor, you will need to re-order the user inputs in the userInputs [] array.

Each user input will look like something like this:

{
"autoCompleteMaxEntries": 5,
"id": "001",
"label": "Observer",
"fieldType": "esriFieldTypeString",
"required": true,
"showEvent": "onEnd",
"domain": {
"allowOther": false,
"dateTime": {
"defaultValue": null,
"displayTime": true,
"maxValue": null,
"minValue": null
},
"dynamicList": {
"dataSourceId": null,
"outFields": null,
"where": null,
"orderByFields": null,
"parameters": null,
"updateMode": "automatic"
},
"type": "userDefined",
"name": null,
"inputMask": null,
"multiline": false,
"hint": null,
"codedValues": [],
"range": [],
"showScanner": false
},
"mode": "button"
},

 

Note that the last user input does not have a comma after its last bracket. 

I would use save as in the designer to create a test version of your project, and use a JSON editor to validate the entire project JSON, before saving.

 

 

View solution in original post

3 Replies
IsmaelChivite
Esri Notable Contributor

@EricaNova  Starting with version 1.18, the order of user inputs is defined by the order in the project JSON. At this moment in time, you need to go into the JSON and reorder things as you see fit manually. Early in 2024 we want to make it possible to change the order visually (no manual JSON editing needed) in the QuickCapture designer.  Our intent here is to provide more flexibility: changing the order of fields in existing layers can be problematic. Having the order come from the JSON will simplify things.

More details in this announcement: https://www.esri.com/arcgis-blog/products/quickcapture/announcements/whats-new-in-arcgis-quickcaptur... 

JohnathanHasthorpe
Esri Regular Contributor

In the JSON editor, you will need to re-order the user inputs in the userInputs [] array.

Each user input will look like something like this:

{
"autoCompleteMaxEntries": 5,
"id": "001",
"label": "Observer",
"fieldType": "esriFieldTypeString",
"required": true,
"showEvent": "onEnd",
"domain": {
"allowOther": false,
"dateTime": {
"defaultValue": null,
"displayTime": true,
"maxValue": null,
"minValue": null
},
"dynamicList": {
"dataSourceId": null,
"outFields": null,
"where": null,
"orderByFields": null,
"parameters": null,
"updateMode": "automatic"
},
"type": "userDefined",
"name": null,
"inputMask": null,
"multiline": false,
"hint": null,
"codedValues": [],
"range": [],
"showScanner": false
},
"mode": "button"
},

 

Note that the last user input does not have a comma after its last bracket. 

I would use save as in the designer to create a test version of your project, and use a JSON editor to validate the entire project JSON, before saving.

 

 

EricaNova
Occasional Contributor

Thanks @JohnathanHasthorpe and @IsmaelChivite ! To me it seems odd that the update changed the order of my fields from the default (the order in the layer) but looking forward to the next release where this can be edited by users. In the meantime, editing the JSON worked for me. Thanks for the hint, JH - that was perfect.