Select to view content in your preferred language

Capture basic attributes on QuickCapture

3143
9
Jump to solution
09-04-2019 03:36 AM
MarkCooper5
Frequent Contributor

Hi

We are using quick capture to gather information for Enforcement cases. It would be useful to be able to attribute the features captured to a particular case number from our corporate database. I presume there is no way of capturing basic attributes like this in the field and we would either need to do this in a web map back in the office or use Collector (which I think is a bit complex for this)

Also, when taking photos, is there a way for it to automatically record the direction the camera is facing as well as well as the coordinates?

Thanks

1 Solution

Accepted Solutions
ChelseaRozek
MVP Regular Contributor

Hi Mark, 

   You can set up a user input variable in QuickCapture to allow for capturing a specific value for potentially multiple features. Information here: Configure a project—QuickCapture | ArcGIS  For example, we use it to populate the Park Name variable when our users are out collecting data in our park system. It might be cumbersome to change that value often, like if you do it for every other feature.

Have you tried Survey123? It might be a good match for you. It wouldn't be as complex as Collector since it's form based (not map based with all the extra layer list, measurement, basemap, etc. buttons like Collector) and you have lots of customization power.  You could put rules on the case number they input to make sure it has the correct format (letters and/or numbers, number of characters, etc.). What other features are you collecting? You can collect points (and soon lines and polygons) in Survey123. You can also sketch on images (either aerial/map or photo taken) if they need to record situation details.

Not sure if you can do it in Quick Capture, but there's documentation about accessing photo metadata to pull into fields with Survey123: https://community.esri.com/groups/survey123/blog/2017/12/12/working-with-exif-image-metadata-in-surv... Location and direction are in there. Experiment with it and see if your devices accurately pass the metadata.

View solution in original post

9 Replies
ChelseaRozek
MVP Regular Contributor

Hi Mark, 

   You can set up a user input variable in QuickCapture to allow for capturing a specific value for potentially multiple features. Information here: Configure a project—QuickCapture | ArcGIS  For example, we use it to populate the Park Name variable when our users are out collecting data in our park system. It might be cumbersome to change that value often, like if you do it for every other feature.

Have you tried Survey123? It might be a good match for you. It wouldn't be as complex as Collector since it's form based (not map based with all the extra layer list, measurement, basemap, etc. buttons like Collector) and you have lots of customization power.  You could put rules on the case number they input to make sure it has the correct format (letters and/or numbers, number of characters, etc.). What other features are you collecting? You can collect points (and soon lines and polygons) in Survey123. You can also sketch on images (either aerial/map or photo taken) if they need to record situation details.

Not sure if you can do it in Quick Capture, but there's documentation about accessing photo metadata to pull into fields with Survey123: https://community.esri.com/groups/survey123/blog/2017/12/12/working-with-exif-image-metadata-in-surv... Location and direction are in there. Experiment with it and see if your devices accurately pass the metadata.

MarkCooper5
Frequent Contributor

Hi

Thanks for the reply - user input variable looks like the way to go. It appears it can only be done via json though. Is that correct? If so, I need to find someone who can help with coding!!

I need to capture points, lines and polygons so at the moment, survey123 is no good

0 Kudos
ChelseaRozek
MVP Regular Contributor

Correct, as of now it can only be done through editing the JSON. It's not too tricky if you make sure to follow the syntax. Here's how to do it:

- Click on the </> next to gear at the top of your QuickCapture project in the designer. Click Edit to edit the JSON.

- If you want, copy and paste all the JSON currently in the designer to Notepad to have a backup.

- Now you need to define the user input variable. Scroll all the way to the bottom of the JSON. There's a line that says

"userInputs": [],

our code is going to go inside the empty [ ] 

- The main parts of the code are

   1) ID (unique identifier, can be any text)

   2) Label (shown above the input textbox in the mobile app)

   3) Field Type (either esriFieldTypeString, esriFieldTypeDouble, or esriFieldTypeInteger)

   4) Required (true or false; true means that the user must type in a value. It will exit the project if they try to hit Cancel to get past the prompt)

   5) Domain (constrains which input is valid; value must be either range (numerical range), codedValue (predefined allowed values like Yes or No), or userDefined (can set an input mask, like 9999 would force user to input four digits))

   (see screenshot below for what I did)

- Then you just have to tell QuickCapture which field will use this defined user input variable. Search for the field's name. In my layer it's called casenum. By default, it said:

{
"fieldName": "casenum",
"value": null
}

I changed the null to "${userInput:apple}" because apple was the unique id for the user input variable that was defined at the bottom of my JSON.

Here's the finished section of my JSON with what I changed in yellow. You can leave inputMask null if you don't want to use it. Let me know if you have specific case number syntax and I can try to help you with the masking. A common JSON mistake is to leave a comma at the end of the last line within brackets. Notice "range":[] doesn't have a comma at the end when "codedValues": [], does. "userInputs":[all our code here], does because "version":0.1 comes after it in the greater { }. If you get an invalid JSON error, check for these commas or for a missing " " on your label, fieldType, id, etc.

Note: I'm not using codedValues and range as I'm using userDefined as my type, however the JSON editor kept adding these lines back in automatically so I provided the full screenshot here so you wouldn't be confused. Since their brackets are empty [ ], this extra bit of code isn't hurting anything.

When I open the project in the app, I am immediately prompted to enter a case number. Here you can see that the label value shows over the text box and the hint shows below it in grey. Once entered, the value will show at the top of the project where it currently says N/A so you know what is currently set and you can click the pencil to edit it.

MarkCooper5
Frequent Contributor

Thank you for this explanation. I have just had the time to get back to this and it works perfectly!

JamieLambert
Frequent Contributor

I would also like to capture photo direction in QuickCapture. Is that currently possible? This attribute would be useful to use for symbology on a map. Johnathan Hasthorpe‌?

Thanks,

Jamie.

JohnathanHasthorpe
Esri Regular Contributor

Hi Jamie

We have plans to support a new azimuth (compass reading) variable. This would allow you to write the value to fields in captured features. Would this meet your requirements?

Thanks

John

0 Kudos
JamieLambert
Frequent Contributor

Sorry for the late reply - yes, that would be great! We did a QuickCapture demo last week and have already got some requests coming in. This would add a lot of value when viewing the data in a Dashboard. Thanks.

0 Kudos
crispinHambidge
Emerging Contributor

Hi Jonathan

do you know if the Quick Capture tool will automatically extract the compass reading from the phone or tablet?

Do you know when this update will be available?

The tool is better than not having it at all at the moment, but would be ten times better if the feature was aware of what direction you are pointing in. especially if you are capturing data from a fast moving vehicle.

Many thanks

Crispin

JohnathanHasthorpe
Esri Regular Contributor

Hi Crispin

We are aiming to get this added to the app for the UC release (July). The idea would be to allow the Azimuth from the device to be written to a field through the use of a variable.

Thanks

John

0 Kudos