Help with while loop
Hello everyone, hope all is well.
It has been a while since I last visited and this forum has always been very helpful and I thought it would be good to clarify a (newbie) question.
I am trying to obtain data from several form fields using the below code:
var count_item = 1;
while (this.getField("Bem_Descr_"+count_item).value!=="")
{
var REG27 = [];
REG27 ["descricao"] = this.getField("Bem_Descr_"+count_item).value;
REG27 ["valor_ant"] = this.getField("Bem_Posicao_Anterior_"+count_item).value;
REG27 ["valor_atual"] = this.getField("Bem_Posicao_Atual_"+count_item).value;
REG27 ["pais"] = this.getField("Bem_Codigo_Pais_"+count_item).value;
var output_reg27 = "\r27"+NR_CPF+REG27.descricao+REG27.valor_ant+REG27.valor_atual+REG27.pais;
app.alert(output_reg27);
count_item++
}
I am able to see each of the results using the app.alert, but I need to have each of the results in a single string altogether.
Could anyone point me in the right direction?
Many thanks in advance!
