Help with JavaScript Script for Survey123
Good morning, everyone.
I need help with a JavaScript script for Survey123.
This is the script:
currently it does not crash inside survey123 but it does not perform the function it is designed for.
the operation is basic, it should take the value of the last record that has been entered by a survey in survey123 in a row of a given field.
the value it currently gives is 0. This value is incorrect as it should give me as a result the last value that was sent by the survey.
Thanks in advance to all of you who participate.
Greetings Javier
Update:
value 0 is obtained return (xmlhttp.status); from what I have read it is a problem that it is not able to connect to the web page. would anyone know how to fix this error?
##########En Español#####################################################################
Buenas a todos.
Necesito ayuda con un script de JavaScript para Survey123.
Este es el Script:
actualmente no da fallo dentro de survey123 pero no realiza la función para la que se ha diseñado.
el funcionamiento es básico, debería tomar el valor del ultimo registro que se ha introducido mediante una encuesta en survey123 en una fila de un campo determinado.
el valor que da actualmente es 0. Este valor es incorrecto ya que me debería dar como resultado el ultimo valor que se envió por la encuesta.
Gracias de antemano a todos lo que participéis.
Saludos Javier
Actualización:
el valor 0 se obtiene return (xmlhttp.status); por lo que he leído es un problema de que no es capaz de conectar con la pagina web. ¿alguien sabría como solucionar este error?
Solved! Go to Solution.
As this script gave a lot of problems in the end I have used the search option to obtain the result I am looking for.
For search to work you have to create an intermediate table that only has the results we are looking for, in my case I have done it through map viewer classic.
Greetings
####################Español##################################################
Como este script daba mucho problemas al final he usado la opción de search para obtener el resultado que busco.
Para que funcione search hay que crear una tabla intermedia que solo tenga los resultados que buscamos, en mi caso la he realizado a través de map viewer classic.
Saludos
As this script gave a lot of problems in the end I have used the search option to obtain the result I am looking for.
For search to work you have to create an intermediate table that only has the results we are looking for, in my case I have done it through map viewer classic.
Greetings
####################Español##################################################
Como este script daba mucho problemas al final he usado la opción de search para obtener el resultado que busco.
Para que funcione search hay que crear una tabla intermedia que solo tenga los resultados que buscamos, en mi caso la he realizado a través de map viewer classic.
Saludos