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:
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"
However, now I'm struggling with how to go about adding in a token request to my JS script. So:
"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.
Hi Deon,
The pulldata JS functionality is limited to surveys that are from the same organization.
Hi James,
Are there any updates regarding this? Our Org would like to implement the pulldata JS functionality for one of our surveys and share it with different Orgs. The pulldata JS functionality works for users that are native from our Org, but we get the same " "Extension disabled" error for outside users. Any help or update would be appreciated!
Carlos
Hi @JamesTedrick,
@JamesTedrick wrote:Hi Deon,
The pulldata JS functionality is limited to surveys that are from the same organization.
How does this affect community users? We have our own organisation plus our community users as part of our Hub Premium subscription. If I create forms without our organisation will the JavaScript functions work for our community users? They are our main audience for surveys.
This looks very promising for something that I will be attempting to do with one of my surveys. I have one question about the use of this function and it pertains to being offline. If I have a worker out in the middle of nowhere without connectivity to the internet, then will this function still work or is this a function that requires you to be connected to the internet? I am guessing there would be a need to be connected in order for it to work.
Thank you for posting this for other to use.
Hi Mike,
If you are particularly planning to query a feature service, then the JS function will not work without connectivity.
Hi James, the PULLDATA to query data from Feature service does not work when using the form from web instead of survey123 application.
is it the behavior of PULLDATA function or am I doing something wrong?