GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 2024
→
Looper Initialisation
Looper Initialisation
Iniciado por SolutionJ-Reg, jun., 27 2017 3:01 PM - 6 respostas
Conecte-se…
SolutionJ-Reg
#1
Publicado em junho, 27 2017 - 3:01 PM
WB20
Hi, is there a way to load a Browser type Looper using code? Every type of statement I try and use gives an error because it can only be used in server side processes.
Cheers
Reg
Denunciar
0
0
Fabrice Harari
#2
Publicado em junho, 27 2017 - 3:11 PM
Hi
sure... looperaddline, by example
Best regards
Denunciar
0
0
SolutionJ-Reg
#3
Publicado em junho, 27 2017 - 3:39 PM
Looperaddline yes, but by using what source data? I can't use any HFSQL commands or constructs, that is the problem...
Denunciar
0
0
Fabrice Harari
#4
Publicado em junho, 27 2017 - 8:00 PM
okay
so your problem has NOTHING to do with loopers.
The question is: how to access DB records from browser code?
In that case, the answer is: there are several ways to do that, depending of your need. The most obvious is to call a server procedure with an ajaxexecute and parse the result to add in the looper.
Best regards
Denunciar
0
0
SolutionJ-Reg
#5
Publicado em junho, 27 2017 - 8:10 PM
I take your point Fabrice, poor phrasing of my actual problem.
I do know how to access DB records from browser code, but I'm still stuck. Basaically in the server procedure that I call with ajaxexecute I parse the resulting data into an array based on a structure, however when I then try to "fill" the looper, which it seems I have to do in browser code, the array containing the data is not available because it was created in a server procedure.
So I suppose my actual specific question is, when I have retrieved my DB data, where do I store it so that it is then available in a browser-side process for use with the looperaddline statement?
Denunciar
0
0
Piet van Zanten
#6
Publicado em junho, 27 2017 - 9:37 PM
Hi Reg,
The way I use is:
- Create a server procedure and allow it to be Ajax.
- In the procedure you gather the looperdata into a string variable like:
for all qry_SoAndSo sContent+=[RC]+qry_SoAndSo.Item1+TAB+qry_SoAndSo.Item2 .. etc end RESULT sContent
Then you use a browser procedure to AjaxExecute the server procedure and fill the looper from the string:
sContent=AjaxExecute(MyServerProcedure) for each string sLine of sContent separated by RC LooperAddLine(LOOP_Looper1,sLine) end
Kind regards,
Piet
Denunciar
0
0
SolutionJ-Reg
#7
Publicado em junho, 27 2017 - 11:01 PM
Hi Piet,
Thanks for this, it's perfect!
Cheers
Reg
Denunciar
0
0
→ Voltar para WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto