MyText := 'Order';
FOR i := 0 to 10 DO BEGIN
SalesHeaderLoop."Document Type" := i;
if format(SalesHeaderLoop."Document Type") = MyText then begin
SalesHeaderNew."document type" := i;
MatchFound := TRUE;
end;
END;
Mind you I would never recommend doing this, since it would be very problematic. better is to find a better way of solving this issue.
Comments
You can 'see' the label in the optionstring as a name of a integer value.
Dan Lindström
NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
MBSP Developer for Microsoft Dynamics NAV 2009
Mind you I would never recommend doing this, since it would be very problematic. better is to find a better way of solving this issue.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n