Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
18%
200 - 500 GB
29%
500 - 800 GB
3%
800 - 1200 GB
8%
1200 - 1500 GB
8%
1500 - 2000 GB
11%
> 2000 GB
24%
Total votes: 79

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
Old 29th April 2012, 17:53
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,823
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 - OS: HP-UX, W2K3, SLES
What do you want to achieve ?

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

explain what do you want to achieve ?

From BaanERP Programmers Guide

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

Synopsis
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 field.name.string, [ALL_ENUMS_EXCEPT], enum_value, ... )
void set.initial.enum.values.for.field
( const string field.name.string, [ALL_ENUMS_EXCEPT], enum_value, ... )

Regards
__________________
//Bernd
Reply With Quote
  #3  
Old 30th April 2012, 15:37
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,382
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.

Thanks
__________________
Mark

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
  #4  
Old 1st May 2012, 20:10
Hitesh Shah's Avatar
Hitesh Shah Hitesh Shah is offline
Guru
 
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

Quote:
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
Sponsored Links
  #5  
Old 19th November 2019, 23:54
younes74 younes74 is offline
Newbie
 
Join Date: Aug 2018
Posts: 2
younes74 is on a distinguished road
Baan: 10.4 - DB: sql - OS: Unix
You use
ltoe(val(YOURSTRING)))
Reply With Quote
  #6  
Old 30th November 2019, 22:18
OmeLuuk's Avatar
OmeLuuk OmeLuuk is offline
Guru
 
Join Date: Mar 2002
Location: The Netherlands
Posts: 1,096
OmeLuuk is on a distinguished road
Baan: Infor LN 6.1 10.2.1 > 10.7 - DB: MS SQL2008 - OS: VM WindowsServer2008R2
Quote:
Originally Posted by younes74 View Post
You use
ltoe(val(YOURSTRING)))
only in case your "text" has the form of "tcyesno.no" 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 "tcyesno.no" is language independent, the "No" part is not.
__________________
Also read Luke 24:4-8
Reply With Quote
Reply


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 19:55.


©2001-2018 - Baanboard.com - Baanforums.com