Announcements
No record found.
Hi
I have an Option Type field . I want to gets its value not 0,1,2 in variable.
Thanks
*This post is locked for comments
can you show your code and what type of dataitems they are etc.?
Below is the code. Category is an option type variable
PLine.RESET;
PLine.SETRANGE("Lot No","Lot No");
IF PLine.FINDFIRST THEN BEGIN
Category := PLine.Type;
END;
When i give Category as Text then it gives error
Text := option error
did you give OptionString property to variable Category?
In tables i have defined Category with Options Export,Import,Domestic.
I want to get this values saved in a variable
You need to declare the variable as Option and set the same option string as you have specified in the table. Then you can assign the value.
I have defined the variable as option . When i display as message it shows correctly but in SSRS it shows 1,2. Those records which have value 0 in Type in Report it does not show
Can u show some example
Did you try FORMAT(optiontype)?
I have defined now variable as Integer. It is working now but it is not displaying Option string value . It is showing 0,1,2
After defining variable as Text and then using Category := Format(PLine.Type).
Then it is showing Option String . Is this the correct way.
yes
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.