Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
17%
200 - 500 GB
17%
500 - 800 GB
6%
800 - 1200 GB
6%
1200 - 1500 GB
17%
1500 - 2000 GB
17%
> 2000 GB
22%
Total votes: 18

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 4th November 2011, 07:29
RobertP RobertP is offline
Member
 
Join Date: Mar 2003
Location: South Africa Cyprus Canada
Posts: 53
RobertP is on a distinguished road
Baan: 4 or 5 - DB: Oracle - OS: Unix
execute(db.update) loses changes on form type 2
Baan: iBaanERP 5.0c
C/S: None/Unknown

Hi, I have a basic problem which is quite simple but I just can’t get it to work.

In a form type 2. Several records have been saved. The last field on the form is a table field of type tcyesno (checkbox).

Step 1 - If the user clicks it yes, then I want the program to automatically save the changes. In the "when.field.changes" section I execute(update.db). In debug, I find that execute(update.db) resets the field value to No! This is the current table field value. Seems like execute(update.db) is actually doing a execute(recover.set)

Step 2 - then execute another function (gen.scm) to generate additional records (on the same table). This function works perfectly if the user manually "saves" the record on step 1 and then executes the function gen.scm from "specific" menu

So, in a form type 2, is user tabs past last field on form, how to auto save the record before proceeding?

Quite a simple but frustrating problem!
Thanks in advance
Robert
__________________
Better to die on your feet than live on your knees
Reply With Quote
  #2  
Old 4th November 2011, 14:46
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,122
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
According to the help on execute:
Quote:
Note

For a list of all standard commands and the program types in which you can use them, see Standard commands.

Context

4GL library function.
You can use this function in 4GL scripts only. You can use it in the following event subsections:

before.choice, on.choice, after.choice
init.form, before.form, after.form, on.entry

You cannot use the function in the after.choice section of choice.update.db.
Doing some checking it seems every place I use it is a choice type section. I can't recall, but I think in one multioccurence session when they insert a new row in the choice section of add.set I execute(update.db) after each row. Check to see if they tab past the last field to start a new record that add.set is not executed - I think you can do it there in the before.choice.
__________________
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
  #3  
Old 11th November 2011, 11:11
RobertP RobertP is offline
Member
 
Join Date: Mar 2003
Location: South Africa Cyprus Canada
Posts: 53
RobertP is on a distinguished road
Baan: 4 or 5 - DB: Oracle - OS: Unix
Thanks Mark,

I solved the problem by calling a function in do.occ()

In the function I first called update.occ() and then execute(update.db) as well as managing the marked record, it all works perfectly, andno messages about "records mod by other user, new values are displayed"..

__________________
Better to die on your feet than live on your knees
Reply With Quote
Sponsored Links
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
dynamic form 'Run-time error 13' Type Mismatch baan_afbs Tools Development 8 21st November 2013 23:28
Default value on form type 3 (multi-occ+view+main) Neal Matthews Tools Development 2 13th February 2007 10:21
Modify fields in type 3 form monica1 Tools Development 10 27th September 2006 13:03
Form Type 2 - Request jholdrid Tools Development 1 23rd March 2005 19:23
Baan & Connectware Driver Hangs Rajasekhar Tools Administration & Installation 2 18th February 2004 21:32


All times are GMT +2. The time now is 06:54.


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