audit fields value changes on a form
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
audit fields value changes on a form
Hi,
Is there any audit functions provided by ebase to record fields values on a form changed by user when submit from old to new and we can record that values are changed and old values are xxx and new data are xxx
Thanks,
Xiaoli
Is there any audit functions provided by ebase to record fields values on a form changed by user when submit from old to new and we can record that values are changed and old values are xxx and new data are xxx
Thanks,
Xiaoli
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
Yes and No.
What we want to do is to remember all input fields' value before page render, then check if any field's value changed, if yes then save both old value and new value to audit table for future reference.
If no available function from ebase, is there a way at the back to iterate all fields to get their name and value?
Thanks,
Xiaoli
What we want to do is to remember all input fields' value before page render, then check if any field's value changed, if yes then save both old value and new value to audit table for future reference.
If no available function from ebase, is there a way at the back to iterate all fields to get their name and value?
Thanks,
Xiaoli
0 x
-
- Ebase User
- Posts: 331
- Joined: Mon Mar 10, 2014 8:34 am
Have a look at http://dev-docs.verj.io/ufs/doc/javadoc ... ields.htmlis there a way at the back to iterate all fields to get their name and value?
Code: Select all
for ( var field in Iterator(fields.iterator()) )
{
log(field.elementName);
}
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
are your controls link to the field of the table or to the item in the fields?
if the input controls is linked to the items in the field tab then you can compare the value in that item with the item in the field table, if something change then save otherwise go to other thing.
if the input controls are linked to the field in the table, then seems you have to have a backup database resource that will be fetched then the values are compared to the values of the input fields.
if the input controls is linked to the items in the field tab then you can compare the value in that item with the item in the field table, if something change then save otherwise go to other thing.
if the input controls are linked to the field in the table, then seems you have to have a backup database resource that will be fetched then the values are compared to the values of the input fields.
xren wrote:Yes and No.
What we want to do is to remember all input fields' value before page render, then check if any field's value changed, if yes then save both old value and new value to audit table for future reference.
If no available function from ebase, is there a way at the back to iterate all fields to get their name and value?
Thanks,
Xiaoli
0 x
-
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
- Ebase User
- Posts: 29
- Joined: Mon Nov 02, 2015 7:19 pm
@Steve James
Could you provide a proper link that works to check out the documentation for http://dev-docs.verj.io/ufs/doc/javadoc ... ields.html
log(field.elementName) just prints the element name. How does one print element value ?
Thanks.
Could you provide a proper link that works to check out the documentation for http://dev-docs.verj.io/ufs/doc/javadoc ... ields.html
log(field.elementName) just prints the element name. How does one print element value ?
Thanks.
0 x
-
- Ebase User
- Posts: 305
- Joined: Thu Jul 02, 2015 8:32 am
- Location: Indonesia
Is log(field.value) work?
mkushwaha wrote:@Steve James
Could you provide a proper link that works to check out the documentation for http://dev-docs.verj.io/ufs/doc/javadoc ... ields.html
log(field.elementName) just prints the element name. How does one print element value ?
Thanks.
0 x
-
- Moderator
- Posts: 184
- Joined: Tue Sep 11, 2007 8:58 am
The url has changed to http://dev-docs.verj.io/ebase/doc/javad ... ields.html
field.elementName gives you the field name.
e.g.
for ( var field in Iterator(fields.iterator()) )
{
log("Field " + field.elementName + " has value of: " + field.value );
}
field.elementName gives you the field name.
e.g.
for ( var field in Iterator(fields.iterator()) )
{
log("Field " + field.elementName + " has value of: " + field.value );
}
0 x
-
- Ebase User
- Posts: 29
- Joined: Mon Nov 02, 2015 7:19 pm
Thanks Hovik& t4nu, that works!
I did the same thing with Tables.
How does one prints values for each row and columns ?
I did the same thing with Tables.
Code: Select all
for (var table in Iterator(tables.iterator())){
log("table:"+table.elementName);
}
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Something like this:
Code: Select all
for (var table in Iterator(tables.iterator())){
log("table:"+table.elementName);
var rows = table.rows;
while (rows.next()) {
for each (var column in table.columns) {
log("column:"+column.elementName + " value: " + column.value);
}
}
}
0 x
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Or you could use the new table.toJSON() method in V5.1:
Code: Select all
for (var table in Iterator(tables.iterator())){
log("table:"+table.elementName);
log(table.toJSON());
}
0 x
Who is online
Users browsing this forum: No registered users and 11 guests