Baanboard.com

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

User login

Frontpage Sponsor

Main

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

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd April 2020, 16:24
dhowells's Avatar
dhowells dhowells is offline
Member
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 65
dhowells is on a distinguished road
Baan: LN 10.5 - DB: MSSQL - OS: Windows
set set.enum.values.for.field dynamically
Baan: Infor ERP 10.6
C/S: None/Unknown

Hello. I need to limit the choices to an enumerated field based on some logic. Has anyone been able to pass a dynamic list to set.enum.values.for.field?

e.g,
logic determines that whinh.oorg.sales, production and 5 other options are the limiting values to be displayed.
how to call set.enum.values.for.field(oorg.field, ???) without having to code each possible outcome.

Thanks,
Dan
Reply With Quote
  #2  
Old 3rd April 2020, 19:13
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,444
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Yes. That's doable.

You need to use -
Code:
set.enum.array.for.field()
e.g.

Say I have 2 fields and based on the value of first, I need to define the values for the second enum field.

Code:
        extern domain whinh.oorg oorg.f |# Enum field
	extern domain tcpono pono.f |# First field used for deriving
	long size
	long values(1) based
|****************************** program section ********************************
field.pono.f:
when.field.changes:
	if pono.f = 1 then
		free.mem(values)
		size = 2
		alloc.mem(values,2)
		values(1) = 1
		values(2) = 2
		set.enum.array.for.field("oorg.f",size,values)
	endif
	if pono.f = 2 then
		free.mem(values)
		size = 3
		alloc.mem(values,size)
		values(1) = 1
		values(2) = 2
		values(3) = 3
		set.enum.array.for.field("oorg.f",size,values)
	endif

Hope that helps!
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #3  
Old 3rd April 2020, 19:18
dhowells's Avatar
dhowells dhowells is offline
Member
 
Join Date: Oct 2001
Location: Detroit, MI
Posts: 65
dhowells is on a distinguished road
Baan: LN 10.5 - DB: MSSQL - OS: Windows
That worked. Thank you Bhushan!

Dan
Reply With Quote
Sponsored Links
  #4  
Old 3rd April 2020, 19:28
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,444
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Glad it did! Cheers
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
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
Compilation error KiranKrishna Tools Development 10 14th January 2020 12:46
Programming Question mr_suleyman Tools Development 37 11th November 2016 08:14
Which Set Commands Do You Use? Why? mr_suleyman Tools Development 14 16th January 2014 21:44
BW client parameters lsatenstein Tools Administration & Installation 2 31st January 2012 21:29
Detected database server termination (help! aide! ayuda! hilfe! ayuto! hellup! •‚¯!)! Francesco Operating Systems & Databases 15 20th July 2002 11:37


All times are GMT +2. The time now is 13:01.


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