Hi,

perhaps this question has already been asked, but i can not find it.

I need to know which columns are being updated by Formspider. For example, i have a panel based on a datasource with 10 columns. When the user updates only 1 column, does Formspider execute an update for only that column or for all columns?

I need to know this because many database triggers should only be fired when specific columns are being changed.

Kind regards, Jan Willem

asked 08 Sep '15, 10:32

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231434
accept rate: 0%

edited 11 Sep '15, 02:06

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5


Hi Jan,

Formspider updates every column in the row when it issues an update.

Are you using the Oracle feature that fires triggers based on a certain column's value changes? Or are you just comparing old and new values of columns in a trigger and execute code if the value has indeed changed?

I guess an easy way to solve this issue would be to compare the old value of the column to its new value and fire the trigger only if the value is really changed. Would this work for you?

Kind Regards,
Yalim

link

answered 09 Sep '15, 05:26

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

Hi Yalim,

I have hundreds of triggers like this:

CREATE OR REPLACE TRIGGER <name> BEFORE DELETE OR INSERT OR UPDATE OF <column 1="">, , .... ON

FOR EACH ROW

Do i really have to rewrite all triggers because Formspider updates all columns?! Incredible. I really think that this is a major design error in Formspider. And it is not necessary, because it is very easy to compose update strings based on changed columns only. I do this all the time in my own plsql-programs.

KR, Jan Willem

link

answered 09 Sep '15, 06:29

Jan%20Willem%20Vermeer's gravatar image

Jan Willem V...
1231434
accept rate: 0%

I see the editor has corrupted the syntax, but i hope it is clear that these triggers are based on updating columns.

(09 Sep '15, 06:30) Jan Willem V...

Hi Jan,

This is not as easy as you think because Formspider supports transactions. So we store updates and apply them at a later point in time which is determined by the developer. So by the time we build the update DML the old value (stored in Formspider) is long gone. But I'll see what we can do.

(09 Sep '15, 06:36) Yalim Gerger ♦♦

I understand Yalim.

Some of the triggers also have to be adjusted for the auditing of last updates etc... So i will probably have to adjust all triggers anyway.

I think it would help a lot if it was possible to turn columns on/off in the datasource definitions. Now always all columns are shown there and i guess they are always updated although they are not visible on the screen. This can be solved by views, but that will become hundredss.

(09 Sep '15, 07:54) Jan Willem V...

Hi Jan,

One thing that might help is that in the IDE you can specify which columns you don't want Formspider to include in any DML. For example, if there are any display only columns, you can exclude them from being part of any DML and populate them via triggers. To do this, open the Datasource Definition Dialog, select the column you want to exclude from any DML and uncheck the Updatable checkbox.

I don't think this is the ideal solution for you but I think this feature in general is good to know and might even help here in some cases.

Kind Regards,
Yalim

(09 Sep '15, 08:42) Yalim Gerger ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×16
×13

Asked: 08 Sep '15, 10:32

Seen: 750 times

Last updated: 11 Sep '15, 02:06


© Copyright Gerger 2017