Options

Request form on Dataport

tguptatgupta Member Posts: 86
Hi All,

I am using a table which has just one dummy field in it for this dataport .
This table is doing nothing .Now on the request form of the dataport i have few fields out of which two are similar to Type and No on the salesline table . Now there is no problem with the type field as i just define a variable with datatype option and define the option string .
Now i want when i select a particluar option value like G/L Account i shud get a look up for G/L Account table on the No field . similarly if i select resource i shud get a look up on resource table .
I have done this thing before with table and forms which is quite simple but i am not able to do it on the request form on dataports . Any help is appreciated . ](*,)

Many Thanks,
Tarun

Comments

  • Options
    fbfb Member Posts: 246
    Try something like this in the OnLookup trigger of the "No." Textbox on the RequestForm:
    CASE Type OF
      Type::Item:
        IF FORM.RUNMODAL(0,Itm) = Action::LookupOK THEN BEGIN
          Text := Itm."No.";
          EXIT(TRUE);
        END;
      Type::Resource:
        IF FORM.RUNMODAL(0,Res) = Action::LookupOK THEN BEGIN
          Text := Res."No.";
          EXIT(TRUE);
        END;
    END;
    EXIT(FALSE);
    
Sign In or Register to comment.