Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index


On Sun, Jul 22, 2018 at 2:58 AM Patrick Gelin <patrick.gelin@free.fr> wrote:

Hi,

I would like to control key generation by macro when inserting a new row
into a form with Base. But the risk is to execute twice insert action :
the first with my handling insert event (I want to manage the mapping
and use my own generated keys) and the second by the form base code
automatically ....


There are two paths to this:
One: setup a inert trigger in the database engine to do this.
Details on creating triggers vary depending on the engine you are using.
This works if the data you use to assemble your key is already in the
database (fields in other tables for instance).
OR
Two: handle it with the client application (Base) which seems to be the
advice you are getting so far.

The decision as to which way to go depends on how you want to use it, doing
it with a triggere means that any form, or table grid, attached to the
table will pick up the function but you if you want to read values from
form controls to construct your key the client side work work best.

Best wishes,

Drew




So, if I set the property {AllowInserts = false}, do the Form stop to
handling the insert but continue to fired /"Before Record Action"/ and
/"After Record Action"/ events ? I think no, because the form could will

not display the new line to insert ...


Ok, that question gets into



So I need to stop the handlind to the Form after my own into events. But
I understand /"After Record action"/ event handling use a /"Sub"/ action
not a /"function"/, so I can't return false after my handling ...

So how to do ?

Thank you for your help...
Patrick
/
/

--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.