Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


As a Customer What would do to keep your ERP Implementation intact
Proactively define Business Process-- Take the Project Ownership
Handover everything to System Integrator from drawing BP till implementation of ERP
Hire more inhouse skilled & capable IT Resource to work directly with SI
Rely on SI Architects/Consultants
Total votes: 11

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 29th April 2012, 15:49
anant desai anant desai is offline
Junior Member
Join Date: Apr 2012
Posts: 23
anant desai is on a distinguished road
Baan: IVc2 - DB: SQl Server 2000 - OS: Windows2000
string to enum

How do I convert a string to an enum?
Reply With Quote
Old 29th April 2012, 17:53
bdittmar's Avatar
bdittmar bdittmar is offline
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,893
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7 - DB: tbase, ms-sql7, oracle10gV1, 11g, 12c, 19c - OS: HP-UX, W2K3, SLES, RHLE
What do you want to achieve ?

Originally Posted by anant desai View Post
How do I convert a string to an enum?

explain what do you want to achieve ?

From BaanERP Programmers Guide

Enumerates overview and synopsis
Use these functions for handling enumerated domains and table fields.

domain ask.enum
( string quescode(14), domain default_enumvalue [, arg ] ... )
string enum.descr$
( string domain code(12), enum_expr [, string language_code] )
long etol
( domain domain_value )
domain ltoe
( long long_value )
void set.enum.values
( enum_constant, ... )
void set.ask.enum.values
( enum_constant, ... )
void set.enum.values.for.field
( const string, [ALL_ENUMS_EXCEPT], enum_value, ... )
void set.initial.enum.values.for.field
( const string, [ALL_ENUMS_EXCEPT], enum_value, ... )

Reply With Quote
Old 30th April 2012, 15:37
mark_h's Avatar
mark_h mark_h is offline
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,543
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
This is the correct forum for posts like this.


GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Old 1st May 2012, 20:10
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Join Date: Nov 2001
Location: Mumbai,India
Posts: 1,853
Hitesh Shah is on a distinguished road
Baan: triton,Baan IVc4 , ERP Ln - DB: Oracle/Bisam/SQL 2000/SQL 2005 - OS: Sun Solaris/Windows 2003
string to enum

Originally Posted by anant desai View Post
How do I convert a string to an enum?
U need to check enum.descr$ function for each enum option and compare the string with string input . If it matches case insensitive , the option is the enum number . U can use RDI functions for this entire function.
Reply With Quote
Old 19th November 2019, 23:54
younes74 younes74 is offline
Join Date: Aug 2018
Posts: 2
younes74 is on a distinguished road
Baan: 10.4 - DB: sql - OS: Unix
You use
Reply With Quote
Sponsored Links
Old 30th November 2019, 22:18
OmeLuuk's Avatar
OmeLuuk OmeLuuk is offline
Join Date: Mar 2002
Location: The Netherlands
Posts: 1,132
OmeLuuk is on a distinguished road
Baan: Infor LN 6.1 10.2.1 > 10.7 - DB: MS SQL2008 - OS: VM WindowsServer2008R2
Originally Posted by younes74 View Post
You use
only in case your "text" has the form of "" for value (text) "No" (enum.descr$). When you want to start with the "No" word you need more code, to find the enum descriptions for the field, put them in an array, compare the input string with the stored values (may be all to.upper$) and use the array index as the value for ltoe(). But be aware that you should do this for all used languages, because the "" is language independent, the "No" part is not.
Also read Luke 24:4-8
Reply With Quote
Old 19th November 2020, 15:27
KaasKarthik KaasKarthik is offline
Join Date: Aug 2020
Posts: 47
KaasKarthik is on a distinguished road
Baan: 9.2 - DB: sql - OS: windows 10
Question hi

hi younes74
whether this will work without any mistake ......
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DEV: Export any Baan table to (proper) Excel Francesco Code & Utilities 27 2nd September 2011 15:00
Writing Export Conditions ian_j_albert Tools Development 4 22nd July 2010 08:30
Help regarding tools session rahul.kolhe22 Tools Development 4 22nd January 2010 14:31
problems with stpapi.zoom.option Finnigan AFS/DDC/OLE: Function servers 5 3rd November 2009 15:04
File Browser Bogdan Tools Development 52 7th January 2004 09:17

All times are GMT +2. The time now is 22:58.

©2001-2021 - -