Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 1 Woche, 3 Tagen
Letzter Beitrag:
vor 1 Woche, 2 Tagen
Beteiligte Autoren:
Ezequiel Reverditto, Fabrice Harari

[WB20] Problem in the action of a button inside a LOOPER

Startbeitrag von Ezequiel Reverditto am 13.07.2017 15:33

Hello developers!

I take a little of their time to see if they can give me a hand on a problem that I have been locked into for some time.

About 6 months ago I am learning and developing a project in WEBDEV at the same time. In this case a PHP project. So there are processes on some elements (tables, loopers for example) in which I burn a time to implement.

The question is this: I have a 'classic' looper which is loaded by means of a query, this looper is in the field of a browser that works with the behavior of a pop-up window. Each time I open this window depending on the parameter you send me will show different registers.

Inside the controls the looper has a button. This button in the 'on click' action (which does not have AJAX mode enabled) has this code in the PHP-Server section:

sRuta is string

IF HFound(d010_evidencias) = True THEN
sRuta = LOOP_QRY_listaEvidencias[ATT_Id_Evidencia].STC_RutaArchivo

In my database I have stored the physical route which when I execute the query the dump in an STC Control (STC_RutaArchivo).

The problem is that when I run FileDisplay and show in a new tab the document (for example a .pdf) Always shows me the document associated with the last record loaded in the looper.

Do you know what the error is? By what he understood to identify the position of an element within the control looper is made use of "[]".

I have to say that I also did this test of working with buttons inside another element like the 'table control' setting the column as a '' container '' type but I was not lucky, which is why I am looking to implement it this way (using a looper control).

I hope they can guide me.


Hi Ezequiel,

it seems that ATT_ID_Evidencia is an attribute from the looper, which is good. What is NOT good is that you are not specifiying the LINE of the looper to reference.

So you should start by something like
iCurrentLine is int=looperselect(LooperName)
if iCurrentLine>0 then
Your existing code here, but with all Attributes of the looper followed by [iCurrentLine]

Best regards

von Fabrice Harari - am 13.07.2017 17:50
Hi, Fabrice.

Good to cross you over here! Look, you know I tried to develop this in a Table Control and I have not had success.
Now I try to do it in a looper control, and I'm at the same crossroads: the time to execute FileDisplay programmed in a button. (I'm sweating the shirt a little :-)

The question in principle is this: I have seen in other examples, tutorials, the use of "Looper Select", but the problem is that the option is not allowed in PHP. And that is why I have tried several ways to 'capture' the position within the looper and get the result explained above.

I have implemented another looper with the functionality of implementing in a button the function "Page Display" (to dump on a series of Edit Control information of a table) and I had no problems.

Is there another way to achieve what I am looking for? That does not seem crazy, but the tool is working a little bit.

I hope I can reach a good port.


von Ezequiel Reverditto - am 14.07.2017 12:05
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.