accessing current field contents

A place for users and developers of the Xataface to discuss and receive support.

accessing current field contents

Postby kedikatt » Mon Dec 26, 2011 10:52 pm

I am initiating an action either before or after a record is saved/updated.
It is just an action to subtract a value entered in a field in the record from a field in another table.
How do I get the value from that field so I can pass it to the action?

User enters the number 10 into the field named Quantity. The action subtracts the value in Quantity field from some other field.

So I need to get the current value in the field Quantity before the record is saved. Or immediately after, if the field values are still available before any other action deletes them.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am

Re: accessing current field contents

Postby ADobkin » Tue Dec 27, 2011 7:17 am

This isn't a specific answer to your question, but it should help point you in the right direction. Take a look at the triggers in the delegate class methods, defined here:

http://xataface.com/wiki/Delegate_class_methods

The details for the beforeSave trigger should be helpful:

http://xataface.com/wiki/beforeSave

You can always search the forum for more examples of these triggers and how others have used them in their applications.

Alan
ADobkin
 
Posts: 195
Joined: Mon Oct 22, 2007 7:31 pm
Location: Atlanta, GA, USA

Re: accessing current field contents

Postby kedikatt » Tue Dec 27, 2011 11:43 am

Great example. Thanks.
kedikatt
 
Posts: 18
Joined: Sun Dec 25, 2011 6:25 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved