Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 9th April 2003, 18:54
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Section for Form Commands?

In Baan V you use the Form Commands session to attach other sessions (functions and menus) to a Form. If you specify 'Activate a Function', you program that function in the main script of the session. If you specify 'Activate a Session' is there a corresponding section in the script I can program? I seem to think there should be, and I did find reference in the Programmers Guide:

Quote:
BaanERP Programmers Guide:

4GL choice sections
--------------------------------------------------------------------------------
You use choice sections to program actions that you want to be executed when standard commands or form commands are activated or ended. Choice sections consist of a main section and a subsection. The main section specifies the standard command or form command for which the actions must be executed. The subsections specify when the actions must be executed.

Main section
choice.<standard command>:
The subsections associated with this main section are executed for the specified command. You can enable standard commands and specify form commands from the session Sessions(ttadv2500m000). A list of standard commands appears at the end of this help topic. For form commands, the session, menu or function name is used.
This seems to indicate I can code something like:

Code:
choice.tiedm1201m000:
before.choice:

If the session tiedm1201m000 is attached as a session to the Form in Form Commands, which would be really cool , but this does not compile. There is no example in the guide, and my eyes are going blinky from grepping 'choice' everywhere...
I also tried
choice.201:

where 201 is the ID of the Form Command....nothing compiles. I know I can move this to a function and code the zoom.to$ there, but I would rather not change the standard form.
Reply With Quote
  #2  
Old 9th April 2003, 19:00
mgakhar's Avatar
mgakhar mgakhar is offline
Senior Member
 
Join Date: Apr 2002
Posts: 119
mgakhar is on a distinguished road
Baan: Baan IV - DB: Oracle - OS: Unix
Not sure as to what you want to code in the Program script when activating a session. But when u activate a session in the form command, there isnt any section in the program script for you to code.
Basically you will have a button u can click to start the session u added in the form command or a menu item under Application menu on the session where u would have a link to start the session u want to activate.

Manish.
Reply With Quote
  #3  
Old 9th April 2003, 19:09
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
I wish to check something before zooming...I don't think that is too uncommon.
I would agree, except for the help I found that is so specific, saying that I could program for the Form Commands: session, menu or function, which are exactly the choices I am looking for. It just does not give the syntax, and maybe it is not even active.
Reply With Quote
  #4  
Old 9th April 2003, 20:05
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Well, I did find an example in the help:

Code:

choice.ttadv2111m000:		| form command
before.choice:
	export_var = "some value"

But when I try the session name, it does not compile. I am guessing since I do have the syntax right that this either was a pipe dream when they were writing the help, or it has been disabled for some reason. We have current porting sets/sp's.
Reply With Quote
  #5  
Old 9th April 2003, 21:47
sujoy.sen's Avatar
sujoy.sen sujoy.sen is offline
Member
 
Join Date: Mar 2003
Location: York, Pa.
Posts: 49
sujoy.sen is on a distinguished road
Baan: BaanERP 5b - DB: Oracle - OS: HP-UX
Did you consider using choice.user.0 (or choice.user.1, etc.) ? Not sure if this helps. Wouldn't you have to change the standard form irrespective of which way you decide to go?
Reply With Quote
  #6  
Old 9th April 2003, 21:53
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
Yes, I'm moving it to a function (in V functions = user options from IV). I do have to change the form to do so.

I'm using a wrapper around the script (our version, RMCgen, like QKEY and 'rush'), so no actual script / source changes. In fact this was such a nice demonstration of that technique..I was hoping to keep the form out of it as well. The standard form has the session attached like that. *sigh*
Reply With Quote
  #7  
Old 9th April 2003, 22:19
sujoy.sen's Avatar
sujoy.sen sujoy.sen is offline
Member
 
Join Date: Mar 2003
Location: York, Pa.
Posts: 49
sujoy.sen is on a distinguished road
Baan: BaanERP 5b - DB: Oracle - OS: HP-UX
Lightbulb

I didn't realize that the session was already attached to the form ... thought you were putting in something new. It all makes sense now. Looked like you were trying different choice options there and I think the user.x extensions are pretty much the only 'non-standard' ones that are compilable (even in V).

You're right: that would have been a good demonstration of the technique. Good Luck!
Reply With Quote
Sponsored Links
  #8  
Old 10th April 2003, 00:17
lbencic's Avatar
lbencic lbencic is offline
Guru
 
Join Date: Dec 2001
Location: Lisle, IL, USA
Posts: 1,148
lbencic will become famous soon enough
Baan: 2.2d - LN - DB: most - OS: most
A Ha. Where there is a will there is a way.
I found this does go through the choice.zoom section, so I have my code now saying:

Code:
choice.zoom:
before.choice:
         if strip$(fattr.zoomsession$) = "tiedm1201m000" then
                    do my logic
         endif

I can leave the form as is, being called as a session direct. I guess that maps to the ole 'choice zoom' option in Baan IV, where you were allowed to attach a zoom session to the choice field. Now you can attach many though, but same section in the code.
Reply With Quote
  #9  
Old 10th April 2003, 15:29
sujoy.sen's Avatar
sujoy.sen sujoy.sen is offline
Member
 
Join Date: Mar 2003
Location: York, Pa.
Posts: 49
sujoy.sen is on a distinguished road
Baan: BaanERP 5b - DB: Oracle - OS: HP-UX
This is pretty cool! Forgot about choice.zoom and certainly didn't know it could be used this way. Will have to make a note of it for later reference. Thanks for the post!
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
How to add a section to the reminder letters report chavez Tools Development 6 7th April 2004 11:51
which section in program script?? en@frrom Tools Development 2 15th March 2004 11:02
section before.field for field type array Natasha Tools Development 2 11th October 2002 10:50
Show all reports in a Report group in a choice.user section halvorn Tools Development 2 3rd April 2002 19:12


All times are GMT +2. The time now is 02:37.


©2001-2017 - Baanboard.com - Baanforums.com