Hi,
I have a form 01 with a field allowing me to select a record (but only one at a time) from an other form 02. I try tu use the SETSELECTIONFILTER function in order to select multiple values at a time but it doesn't work. I only have the record which the cursor is on.
I use a button and put this code on it (OnPush trigger) :
CurrForm.SETSELECTIONFILTER(SelectionTest);
IF SelectionTest.FINDSET THEN
REPEAT
MESSAGE('message test');
UNTIL NEXT = 0;
I read a lot of posts on it on Mibuso but I can't solve my problem.
An idea ?
Comments
Is this how it is written?
If so try the following:
CurrForm.SETSELECTIONFILTER(SelectionTest);
IF SelectionTest.FINDSET THEN
REPEAT
MESSAGE('message test');
UNTIL SelectionTest.NEXT = 0;
But I have an other problem. EvenIf I select many values, I only have one that is added the the form 02 when I push on the button.
I tried your code and it worked fine. So that makes me think maybe the problem is how you are selecting the records...
First, you will need a list form of some sort. Then, select the records you want by holding down either the SHIFT or CTRL key. They will be highlighted in blue. Then click on the button. You should see a test message for every record you have selected.
If you do not highlight multiple records before running the code, it will only give you one test message, for the currently selected record, like you said.
LeoNav
I have this error "Copying all filters at once can only be done etwwen records beloinging to the same table" when I compile this code on my form :
An idea ?
CurrForm.SETSELECTIONFILTER(Job);
what is job here?