In a table there's an optin field with optionstring=Vállalat,Vevő,Szállító.
I made a function like this:
function LookupSite(PartnerType: 'Vállalat,Vevő,Szállító');
begin
do something with PartnerType...
end;
I call this function like this:
var variable:'Vállalat,Vevő,Szállító';
begin
variable:=Rec.Type;
LookupSite(variable);
end;
Rec.Type is is an Option field Vállalat,Vevő,Szállító.
If Rec.Type=Vevő, then variable's value will be Vállalat. If Rec.Type=Szállító, then variable's value will be Vevő.
What am I doing wrong?
Comments
Try for dubugging purposes to give 2 parameters, the one you already have and a second, integer type. Pass the same values to your routine, like this: and see what the message shows...
Is it param1=param2?
Option type is in fact integer type... so you can use an integer parameter.
Arhontis
https://forum.mibuso.com/search
The initial comma makes the first option (no. 0) blank, but if there isn't a blank char before the comma you wont see it when showing the field on forms. Have you looked at the OptionStr property of the field?
Peter