SetSelectionFilter and Temporary Table

StaminosStaminos Member Posts: 68
Hi,

I have a little problem with currform.setselectionfilter(VarTable) based on temporary table.
It is simple, it doesn't work.

So, if anybody know how record was mark when it selected i take it !

Thank a lot

Comments

  • garakgarak Member Posts: 3,263
    native or sql? if sql is the sort order the pk sort order? viewtopic.php?f=23&t=27755
    Is there an error message displayed?

    example: form is based on tab 18
    Form - OnInit()
    InitTempTab();
    
    Form - OnFindRecord(Which : Text[1024]) : Boolean
    TempCust.COPY(Rec);
    Found := TempCust.FIND(Which);
    Rec := TempCust;
    EXIT(Found);
    
    Form - OnNextRecord(Steps : Integer) : Integer
    TempCust.COPY(Rec);
    ResultSteps := TempCust.NEXT(Steps);
    Rec := TempCust;
    EXIT(ResultSteps);
    
    
    InitTempTab()
    Cust.setrange("No.",'00000001','00000010');
    cust.find('-');
    repeat
      Tempcust := cust;
      Tempcust.insert;
    until cust.next = 0;
    
    
    <Control1119402005> - OnPush()
    CurrForm.SETSELECTIONFILTER(Cust);
    IF Cust.FIND('-') THEN BEGIN
      REPEAT
        MESSAGE(Cust."No." + ' ' + Cust.Name);
      UNTIL Cust.NEXT = 0;
    END;
    

    or the the TempTab is set before in a other function like
    TempTab := Rec; //somewhere in a loop for example
    
    form.run(FormID,TempTab);
    

    In the form (FormID) you have the same setselectionfilter function like in the source above.
    Regards
    Do you make it right, it works too!
  • StaminosStaminos Member Posts: 68
    Thank for your response.

    But my problem is when i mark.

    I can't get marked line without function in menuitem. I use function coded in assistedit trigger form's control.

    So if somebody have a solution...
Sign In or Register to comment.