You will have to program it manually in the "OnLookup"-trigger of the field. Something like this:
recMyrecord.RESET;
recMyrecord.SETCURRENTKEY(Field1[,Field2,Field3,...]);
recMyrecord.FILTERGROUP(6);
recMyrecord.SETRANGE(Field1,RangeStart[,RangeStop]);
recMyrecord.SETFILTER(Field2,SomeFilter);
recMyrecord.FILTERGROUP(0);
recMyrecord.Field1 := Initial field1; // these 3 lines are to preset the record on a certain record in the lookupform
recMyrecord.Field2 := Initial field2; //
recMyrecord.Field3 := Initial field3; //
IF FORM.RUNMODAL(FORM::"LookupForm",recMyrecord) = ACTION.LOOKUPOK THEN BEGIN
VALIDATE("My Lookup Field",recMyrecord.Field1);
VALIDATE("Some Other Field",recMyrecord.Field2);
...
END;
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Comments
You will have to program it manually in the "OnLookup"-trigger of the field. Something like this:
recMyrecord.RESET;
recMyrecord.SETCURRENTKEY(Field1[,Field2,Field3,...]);
recMyrecord.FILTERGROUP(6);
recMyrecord.SETRANGE(Field1,RangeStart[,RangeStop]);
recMyrecord.SETFILTER(Field2,SomeFilter);
recMyrecord.FILTERGROUP(0);
recMyrecord.Field1 := Initial field1; // these 3 lines are to preset the record on a certain record in the lookupform
recMyrecord.Field2 := Initial field2; //
recMyrecord.Field3 := Initial field3; //
IF FORM.RUNMODAL(FORM::"LookupForm",recMyrecord) = ACTION.LOOKUPOK THEN BEGIN
VALIDATE("My Lookup Field",recMyrecord.Field1);
VALIDATE("Some Other Field",recMyrecord.Field2);
...
END;
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Depending on another field, conditionnal relation is done.