Buenas tardes
Quisiera preguntar si es posible hacer Pulldata para una encuesta de Survey123 y este llame información de un Servicio Web. Muchas gracias!!
Solved! Go to Solution.
verifica si esto te ayuda. yo lo estoy usando.
Starting at version 3.0, we would like to enable you to extend the pulldata() function with your own JavaScript functions. This is an advanced technique that can help you introduce logic beyond what is possible through standard XLSForm syntax.
The pulldata() function is designed to help you return a single value. Just as a reminder, pulldata() is typically used to:
Our proposal is to now also let you invoke your own JavaScript functions to return values: You decide what goes on within your JavaScript function!
The syntax for using your own JS functions with pulldata is as follows:
pulldata("@javascript","yourJSFile.js","yourFunction","parameter1","parameter2")
Your custom JavaScript files must be stored in a folder called 'extensions' within the survey directory. You can add as many function parameters as needed. In the example above, the JS function is expecting 2 parameters, but you could more or less as needed by your own function
To help you get started, I have created a survey that will show the basics. Just a few words of wisdom:
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')
var utcOffset = - new Date().getTimezoneOffset
It is time for you to have fun! Please use the forums to let us know how things go. Write your notes no matter if things go well or not.
ejemplo dan de esri:
verifica si esto te ayuda. yo lo estoy usando.
Starting at version 3.0, we would like to enable you to extend the pulldata() function with your own JavaScript functions. This is an advanced technique that can help you introduce logic beyond what is possible through standard XLSForm syntax.
The pulldata() function is designed to help you return a single value. Just as a reminder, pulldata() is typically used to:
Our proposal is to now also let you invoke your own JavaScript functions to return values: You decide what goes on within your JavaScript function!
The syntax for using your own JS functions with pulldata is as follows:
pulldata("@javascript","yourJSFile.js","yourFunction","parameter1","parameter2")
Your custom JavaScript files must be stored in a folder called 'extensions' within the survey directory. You can add as many function parameters as needed. In the example above, the JS function is expecting 2 parameters, but you could more or less as needed by your own function
To help you get started, I have created a survey that will show the basics. Just a few words of wisdom:
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')
var utcOffset = - new Date().getTimezoneOffset
It is time for you to have fun! Please use the forums to let us know how things go. Write your notes no matter if things go well or not.
ejemplo dan de esri: