Welcome! Log In Create A New Profile

Advanced

Looper control question.

Posted by DarrenF 
DarrenF
Looper control question.
May 08, 2009 05:28PM
Hi all,

I have a question regarding a Looper control that I'm trying to get working - it's my first Looper Control, so go easy on me :confused:

I have a Looper Control on a window and it is linked (via the Content tab) to a file (let's call it Specification_Definition) and there are 4 fields from this file defined in the looper control. Now my difficulty comes when I want the user to be able to select a product in each row in the looper (the product file isn't related in the Analysis). To this this end, I've tried placing a combo box in the looper which lists the Products for selection - so far so good (I thought)!

This combo box lists the required products and allows the selection of a product, but when I move focus to a different row of the looper, the selection of the product in the combo is lost. I thought the selection would be retained :confused:

I thought I would be able to let the user make their product selections on each of the rows they wanted to, then (when they press an OK button for example), I could work through the looper rows simply creating a Specification_Quote (with Quote_Lines) for each row of the looper - but no sad smiley

Do you have any thoughts? Do I need to maintain the Product ID's that have been selected in a separate array (that maps across to the looper), for instance or is there an esier way that I'm missing?

Thanks in advance...
Fabrice Harari
Re: Looper control question.
May 09, 2009 12:30AM
Hi Darren...

your looper is directly linked to a file, and in that case (same as a table directly linked to a file), only the visible elements/lines are loaded in memory at any given time.

Which means that any memory/calculated/entered content on a line that becomes not visible (scroll down situation) is lost. In your case, it's the selection in your combo...

So you can either use a MEMORY looper and load it programatically (in that case, everything is loaded in memory and your combo selection will stay with your lines) _OR_ you can keep your FILE looper and manage a separate array or memory zone in which you store the line selected (in the code selection of a line of the combo) and from which you take the selected line in the code display of a line of the looper...

Best regards

DarrenF
Re: Looper control question.
May 12, 2009 03:21AM
Hi,

Okay, I've coded an array (memory zone) that holds the product ID that is selected by the operator.

I may be missing something - I know I can display the selected product in the combo box when the looper row is selected (Row Selection), but is there a technique to show the product that has been selected in the combo box even when the looper row isn't selected?

Cheers...
Fabrice Harari.pcs.crosspost
Re: Looper control question.
May 12, 2009 11:28AM
Hi Darren,

as I was saying:
"... in the code display of a line of the looper..."

Not the the line selected, the Code for the DISPLAY OF A LINE

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on [www.fabriceharari.com]


DarrenF wrote:
> Hi,
> Okay, I've coded an array (memory zone) that holds the product ID that is selected by the operator.
> I may be missing something - I know I can display the selected product in the combo box when the looper row is selected (Row Selection), but is there a technique to show the product that has been selected in the combo box even when the looper row isn't selected?
> Cheers...
>
Message forwarded from pcsoft.us.windev
DarrenF
Re: Looper control question.
May 12, 2009 06:18PM
Hi Fabrice,

Thanks for getting back in touch - sorry I didn't pick-up on the row display bit of your reply - now I've got it - I'll give it a try asap :spos: I'm sure it'll work...
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: