crowdsource reporter calculated fields or default field value expressions?

1080
5
10-26-2016 08:24 AM
MikeFuller2
New Contributor II

I am configuring the crowdsource reporter template, and I was wondering if there is a way to automatically populate a field in my comment table as the difference of two numeric fields that users enter into the app. Ideally, users would click on the Comment or Submit Report button and see three blank fields--field1, field2, and field3. They enter numbers into field1 and field2, then field3 displays !field1!-!field2! automatically. How can I make this happen? Can I create an expression for the default value?

0 Kudos
5 Replies
AllisonMuise1
Occasional Contributor III

mikerfuller‌: The form in Reporter is really just displaying the editing popup from the map. Calculations like this aren't supported in the map popup at the time, so we don't support them in Reporter, either.

If you don't necessarily need the value of field3 calculated and presented live to the user in the form, you could schedule a Python script to regularly go through the service to update the value of field3. In an upcoming release we'll be including a script for a similar workflow, but instead of doing calculation among fields it will be calculating an identifier for the report.

-Allison

0 Kudos
MikeFuller2
New Contributor II

Allison Muise‌,

Thanks for the response! And thanks for the Python script suggestion. As I believe Bruce Dickinson once said, "I got a fever, and the only prescription is more Python."

Mike

AllisonMuise1
Occasional Contributor III

haha i like it!

0 Kudos
MikeFuller2
New Contributor II

When I come up with code that works, where’s the best place to share it (if it’s worth sharing)?

Mike

0 Kudos
AllisonMuise1
Occasional Contributor III

You could put it here: ArcGIS Code Sharing 

0 Kudos