How can i assign VALUE,CAPTION Using OPTION Type ??

pskannaa
Member Posts: 138
Hi,
I need to store the values like
"Transaction Type"(Dropdown) -->
Value : Order ->should be showing caption is "Purchase Order"
Value : Return ->should be showing caption is "Sales Return"
So, when user is selecting the "Transaction Type" and they can see only "Purchase Order","Sales Return"
If choose "Purchase Order" i need to get the relavent VALUE for calculating purpose i.e "Order"
If choose "Sales Return", get the relavent VALUE for calculating purpose i.e "Return"
Regards,
Psk
I need to store the values like
"Transaction Type"(Dropdown) -->
Value : Order ->should be showing caption is "Purchase Order"
Value : Return ->should be showing caption is "Sales Return"
So, when user is selecting the "Transaction Type" and they can see only "Purchase Order","Sales Return"
If choose "Purchase Order" i need to get the relavent VALUE for calculating purpose i.e "Order"
If choose "Sales Return", get the relavent VALUE for calculating purpose i.e "Return"
Regards,
Psk
0
Comments
-
By setting the Properties: OptionCaptionML. If it is a Global/Local variable, by seting the properties of TextBox in which SourceExpr is set to this variable.
OptionString: ,Order,Return
OptionCaptionML:ENU=" ,Purchase Order,Sales Return";PLK=" ,Zamówienie zakupu,Zamówienie zwrotu sprzedaży"0 -
I also use the same in the 'FIELD' property
eg:
Field: "Transaction Type" ->property->SET
OptionString: ,Order,Return
OptionCaptionML:ENU=" ,Purchase Order,Sales Return"
When i print the value it's showing "Purchase Order" only not "Order"
or Is't need to set the 'option' in VARIABLE and assigned it into FIELD(transtype) ???????0 -
Sorry I misunderstand You. Do You want to customize captions at the run-time?
If You have set up captions, system (by default) is going to use them. So whenever You will use this variable, You are going to get caption of chosen value as result.
There are some possibilities of changing it, like this:
viewtopic.php?f=5&t=6746&hilit=CodeUnit.run0 -
I'm sorry , confusing !!!!
want i need exactly is
While creating Table i hav set the Field "Transaction Type" is OPTION and goto property,SET
OptionString:" ,Order,Return"
OptionCaption = " ,Purchase Order,Sales Return"
OptionCaptionML:ENU=" ,Purchase Order,Sales Return"
then, create form based on the table.
When i select the DropDown(TransType) is 'Purchase'
code: Message(Rec."Transaction Type");
here the output is showing only "Purchase"
but i need to get the corresponding CAPTION value i.e "Order"0 -
Why don't you just keep the option values and the option caption values the same? That way your code will always reflect actual values, and it will be much easier to read the code. There is no reason that I can think of why you would need to do this.0
-
My customization User wants to show/Display the "Transaction Type" is "Purchase" and it will be Matching the Transaction type while creating "Purchase Order", so that i can match the "document type" of PO Card.
Like
If myform.Transaction type = Poheader.Document type Then do statements...
..............
..............0 -
I doesn't understand your problem.
First you set the correct optionString and Option Caption in the Field self
Property OptionString: Purchase Order,Sales Return
Property OptionCaptionML: ENU=Purchase Order,Sales Return;YOULANGUAGECODE=Purchase Order,Sales Return
So the system will ever display the string Purchase Order or Sales Return.
If you need on the form self a other optiondescription, you can change the property OptionCaptionML on the control on the form also.
for example to:
OptionCaptionML: ENU=Rabbit,Snake;YOULANGUAGECODE=Bunny,Cobra
RegardsDo you make it right, it works too!0 -
pskannaa wrote:My customization User wants to show/Display the "Transaction Type" is "Purchase" and it will be Matching the Transaction type while creating "Purchase Order", so that i can match the "document type" of PO Card.
Like
If myform.Transaction type = Poheader.Document type Then do statements...
..............
..............0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions