The solution of your problem is simple.
You have to code the on lookup trigger, then call your form with the form.runmodal (run) function. In this function you have the possibility to give the form a table as parameter. if you set some filters on this tables the form will only show the filtered ones.
example:
Item.setrange("No.", '1');
if form.runmodal(Form::"Item Card",Item) = Action::Lookupok then begin
// Your On lookup ok code
end;
The solution of your problem is simple.
You have to code the on lookup trigger, then call your form with the form.runmodal (run) function. In this function you have the possibility to give the form a table as parameter. if you set some filters on this tables the form will only show the filtered ones.
example:
Item.setrange("No.", '1');
if form.runmodal(Form::"Item Card",Item) = Action::Lookupok then begin
// Your On lookup ok code
end;
Hope this helps....
edit: Just read the helpfile enty: form.run
Thanks Buddy But I have a different problem
In my report On the request form I have taken A text box and attached it with a form i.e. customer list, now I want that user will see only those customer which have lets say (Customer Posting Group-- India) means to say I want to set the filter on that form which I set in the property of above text box Now as u know the property of that form will not be displayed in C/A L symbol menu Now How will I set the View of that customer list run time? :-k
recCustomer.RESET;
recCustomer.SETRANGE("Customer Posting Group",'INDIA');
IF FORM.RUNMODAL(0,recCustomer) = ACTION::LOOKUPOK THEN
CodCustomer := recCustomer."Code";
And you can also put the filters in another filtergroup, so the user cannot change them.
In The Request form , I have taken a text box and in its properties I had set
Source expr -- custno(Variable of type code )
Table Relation-- Customer."No."(which relate to no. field of customer)
LookUpFormID-- Customer List(form customer list)
--table relation doesnt allow me to set external variable like u suggested for writing code
--LookUpFormID doesnt allow me to set external form defined in C/A L Global for using on code
You can't use the standard lookupform.
You have to program all:
-table to use
-filters to use
-form to use [FORM.RUNMODAL(0,...] in case of the standard form or [FORM.RUNMODAL(FORM::"The Form",...] in case of another form.
And that code you have to put in the OnLookup-trigger of your field.
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
You can't use the standard lookupform.
You have to program all:
-table to use
-filters to use
-form to use [FORM.RUNMODAL(0,...] in case of the standard form or [FORM.RUNMODAL(FORM::"The Form",...] in case of another form.
And that code you have to put in the OnLookup-trigger of your field.
Thanks , Its Great to have cooperative Professional like u in the forum
Answers
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
first, welcome to mibuso.
The solution of your problem is simple.
You have to code the on lookup trigger, then call your form with the form.runmodal (run) function. In this function you have the possibility to give the form a table as parameter. if you set some filters on this tables the form will only show the filtered ones.
example:
Item.setrange("No.", '1');
if form.runmodal(Form::"Item Card",Item) = Action::Lookupok then begin
// Your On lookup ok code
end;
Hope this helps....
edit: Just read the helpfile enty: form.run
Its easy for this example. if you want to auto lookup when run the 2nd form. try to use the flowfield on table property
Caclformula=Lookup("Sales Line".Description WHERE (Document Type=FIELD(Sales Document Type),Document No.=FIELD(Sales Document No.),Line No.=FIELD(Sales Line No.)))
maybe, it is more help
cheer
Thanks Buddy But I have a different problem
In my report On the request form I have taken A text box and attached it with a form i.e. customer list, now I want that user will see only those customer which have lets say (Customer Posting Group-- India) means to say I want to set the filter on that form which I set in the property of above text box Now as u know the property of that form will not be displayed in C/A L symbol menu Now How will I set the View of that customer list run time? :-k
Anand Kumar
Navision Technical Consultant
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
In The Request form , I have taken a text box and in its properties I had set
Source expr -- custno(Variable of type code )
Table Relation-- Customer."No."(which relate to no. field of customer)
LookUpFormID-- Customer List(form customer list)
--table relation doesnt allow me to set external variable like u suggested for writing code
--LookUpFormID doesnt allow me to set external form defined in C/A L Global for using on code
Now how can i now set the view of lookup form
Anand Kumar
Navision Technical Consultant
You have to program all:
-table to use
-filters to use
-form to use [FORM.RUNMODAL(0,...] in case of the standard form or [FORM.RUNMODAL(FORM::"The Form",...] in case of another form.
And that code you have to put in the OnLookup-trigger of your field.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks , Its Great to have cooperative Professional like u in the forum
Anand Kumar
Navision Technical Consultant