Assigning Text values to an Option Variable
cloudnine
Member Posts: 25
How do you guys do assigning of text values to an Option variable...Thanks
0
Comments
-
If You want to add text then you need to update the option string of the variableGuna0
-
What i want to do is during runtime...I want to assign a set of texts that will serve as option one i choose another option...Thanks0
-
If you want to add dynamically then i think its not possibleGuna0
-
Hej cloudnine,
you have to make a repeat to find the appropriate option-value:idx : integer; found : Boolean; OptText : Text(30); Options : "Zero,One,Two,Three,Four"; OptText := 'Three'; idx := 0; REPEAT Options := idx; idx += 1; found := FORMAT(Options,0,'<text>') = OptText; UNTIL (found) OR (DELCHR(FORMAT(Options,0,'<text>'),'=','0123456789') = '');
The
DELCHR(FORMAT(Options,0,'<text>'),'=','0123456789') = ''
is used to stop the loop, if there is no match.
If Options = 5 will make FORMAT(Options,0,'<text>') = '5'
I hope it'll be helpfull for you.With Kind Regards
Thoms Hviid Thorn0 -
cloudnine wrote:What i want to do is during runtime...I want to assign a set of texts that will serve as option one i choose another option...Thanks
Do you want to update a option field from a user text?
something like:
EVALUATE(Option, Text);
?
MatteoReno Sistemi Navision Developer0 -
... another comment:
If you're using 3.7 or 4.0 and your option-variable is a table field, you may use RecordRef/FieldRef and the functionality here to make the code nicer.
I have no code example on that, though. Here you're on you own
With Kind Regards
Thoms Hviid Thorn0 -
Eto,
That's most likely i want to do...update an option variable based on the user text...for example i entered "test" in text variable...the value of option variable should be "test1, test2, test3"...then if i entered "testing" in text variable...the value of option variable should be "testing1, testing2, testing3"...would that be possible...How is it implemented in C/SIDE...Thanks...0 -
You can use some table into which you add the strings and open it in Lookup form for the user. No way through option type...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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
