|
POST
|
Got it. All screenshots are from ArcGIS Online. That one you reference (Jan 4, 8:09 PT/11:09 ET) is the "data" tab of the hosted feature service produced by Survey123.
... View more
01-11-2019
11:53 AM
|
0
|
2
|
1937
|
|
POST
|
Thanks Jake Skinner, but with a little help from James Tedrick I figured this out. For anyone who'd like to replicate this I have attached my full survey, including the 'extension' folder containing the JS Script. Here's how to get it running: Download and Unzip the attached Publishing the Survey will create you a feature service that duplicates the schema of a Workforce assignments layer Inside the 'extensions' folder open the QueryFS.js and insert the URL of the feature service that you'd like to query and pull attribute values from to insert into your Survey Create a Workforce Project and in the dispatchers map ensure that the attribute used for the title of your popup is FacilityID (or some other unique value you use to query out individual features) Within Workforce, under 'Advanced', ensure the Survey123 integration matches the below Create a new assignment in Workforce. The Location should get automatically set to your FacilityID. In the Workforce app open the project and "Survey at assignment". It should pass the FacilityID into the location field of your survey. That same FacilityID gets passed to QueryFS.js which, along with a token, queries the Feature Service you define for that value and returns a JSON object. There are examples in the excel of how to parse out the JSON to obtain the attribute values.
... View more
01-11-2019
07:39 AM
|
0
|
0
|
6566
|
|
POST
|
James Tedrick I'm not quite sure what you mean "by viewing the table". The screenshots in the above post are from the Feature Service hosted in ArcGIS Online. The actual survey itself is accessed and completed by staff using https://survey123.arcgis.com Hope this helps.
... View more
01-10-2019
03:17 PM
|
1
|
4
|
7367
|
|
POST
|
James Tedrick Here's what my Labels look like in AGO. If I remove the HTML formatting, it simply gives me plain black text.
... View more
01-10-2019
03:08 PM
|
0
|
6
|
7367
|
|
POST
|
Hmmm...OK, so that's not an option for getting a features attributes into a survey. Instead, I've found a solution leveraging the ability of Survey123 for ArcGIS to run a JS file, query for a particular feature (with the ID passed in from Workforce for ArcGIS) and return that feature's values as JSON which can be parsed and pushed into the survey. I discuss it in this post here.
... View more
01-08-2019
05:28 AM
|
0
|
0
|
1402
|
|
POST
|
Hello Survey123 for ArcGIS Team I'm attempting to use the example given in the Custom pulldata() JavaScript Functions here. However, I'm struggling with how to request a security token. Here's my setup: I query a Feature Service for a particular feature ID using the below: var url = "https://services1.arcgis.com/xxxxxxx/arcgis/rest/services/xxxxxx/FeatureServer/0/query?where=" +"FACILITYID+%3D+%27" + ID +"%27" +"&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&resultType=none&distance=0.0&units=esriSRUnit_Meter&returnGeodetic=false&outFields=*&returnHiddenFields=false&returnGeometry=true&multipatchOption=xyFootprint&maxAllowableOffset=&geometryPrecision=&outSR=&datumTransformation=&applyVCSProjection=false&returnIdsOnly=false&returnUniqueIdsOnly=false&returnCountOnly=false&returnExtentOnly=false&returnDistinctValues=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&having=&resultOffset=&resultRecordCount=&returnZ=false&returnM=false&returnExceededLimitFeatures=true&quantizationParameters=&sqlFormat=none&f=pjson&token=BIG OLD SECURITY TOKEN" The above URL works great, and returns a JSON object for the desired feature that I can parse out and populate various fields within my Survey. However, I got that URL from experimenting with the Service URL query function. Because I was logged into to AGO when doing that I got a security token as part of the URL. However, now I'm struggling with how to go about adding in a token request to my JS script. So: Is there a way to register this app in order to follow these steps? Or, is there a method to pull a users password (I know there's one for username)? Or, the example given in the Custom pulldata() JavaScript Functions here includes the below. However, there's no further documentation on how I use the 'token' property to pull a token: "Sometimes, particularly when using JS to access web services and secure ArcGIS services, you may need some properties that are not available through standard XLSForms. For this reason, we have also extended the collection of properties you can obtain through property() function as follows: property('propertyname') portalurl token ..." Any help would be greatly appreciated. Jake Skinner
... View more
01-07-2019
12:38 PM
|
2
|
15
|
11800
|
|
POST
|
Hello Christopher Blinn / Derck Vonck It's not an exact match for your workflow but in this post I explain how to query a feature service upon opening Survey123 for ArcGIS, passing in the FacilityID from Workforce for ArcGIS and pushing the attributes from the queried featured directly into your survey.
... View more
01-07-2019
11:19 AM
|
2
|
0
|
2000
|
|
POST
|
Craig Gillgrass / Aaron Pulver just for my own knowledge can you explain how the 'assignmentIntegrations' work? More specifically, I see that it's passing values to Survey123 using ${assignment.latitude} However, nowhere else in the JSON is 'assignment' set. So how does the app know what 'assignment' is? Can I use a similar trick to specify attributes from '${layername.attribute}' ? "assignmentIntegrations": [ { "id": "default-survey123", "prompt": "Survey at Assignment", "urlTemplate": "arcgis-survey123://?itemID=xxxxxxxxxxxxxxxxxxxxxxx¢er=${assignment.latitude},${assignment.longitude}&field:FacilityID=${assignment.location}" } ]
... View more
01-07-2019
10:21 AM
|
0
|
2
|
1402
|
|
POST
|
Hello James Tedrick I have the exact opposite issue. For some reason my survey is returning label values and not the name values from my 'select_one' list. This is problematic as I include HTML in the label to color code them: Form: list_name name label yes_no YES <font color='green'><b>YES</b><font> yes_no NO <font color='red'><b>NO</b><font> Results are recorded as:
... View more
01-04-2019
08:09 AM
|
1
|
8
|
7367
|
|
POST
|
Hi Derek Law Thanks for the reply. I have each of the below: 10x Indicators 16x Gauges 8x Pie charts 8x Lists All of the above are filtered by 4 category selectors, all of which filter the above both individually or in combination. I did as you suggest: I up'd my feature service maxRecordCount to 10000 (I only have 125 features) For each list element I increased the Maximum Features Displayed from 50 to 500 Sadly, I see no improvement in performance.
... View more
12-17-2018
03:17 PM
|
0
|
1
|
2004
|
|
POST
|
Thanks Aaron Pulver - do you have a tentative timeline?
... View more
12-12-2018
05:50 AM
|
0
|
4
|
1402
|
|
POST
|
Hi Workforce for ArcGIS team Is there a way to pass attribute values from the feature used to create an assignment, into the assignment itself? I'd love to be able to populate the description of an assignment (or additional fields) with values from an asset that I can then both present to the field worker as well as push on and into Survey123. Thanks
... View more
12-11-2018
03:47 PM
|
1
|
0
|
627
|
|
POST
|
Aaron Pulver I did this - added extra fields to my Assignment layer with the hope of populating them with attributes from my assets that I want to inspect. However, as I'm not generating assignments programmatically, but through the WorkForce dispatcher map/app I can see no way of passing values from the asset into the assignment. Is this possible?
... View more
12-11-2018
03:29 PM
|
0
|
6
|
2463
|
|
POST
|
Hi Philip Wilson I have a similar need where I want to create a survey that sales staff can use to record if they've reached out to a customer each month. As described above, I'd like for them to be able to select multiple customers and check "YES" all in one survey, but generate several records (one for each selected customer). If i understand you: The feature service needs only SALES_STAFF. This does NOT get updated by the submitted survey. The related table is related to the above via SALES_STAFF: It also contains: CUSTOMER, DATE, CONTACTED (YES/NO). What I'm failing to understand is that if a member of sales staff selects multiple customers, I still only get a single new record in my related table, with all those selected customers in a comma delimited list...right? If so, what's the need for a related table? Thanks
... View more
12-07-2018
08:53 AM
|
0
|
1
|
703
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-07-2018 08:23 AM | |
| 1 | 04-06-2018 08:25 AM | |
| 1 | 01-10-2019 03:17 PM | |
| 1 | 01-04-2019 08:09 AM | |
| 2 | 02-08-2019 08:23 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|