field name

Questions, tips and tricks and techniques for scripting in Servoy

field name

Postby ruhsert » Sat Jun 07, 2003 10:55 am

hello, is there a way to get the name of the current field on a form? to build my own tracking, it be very helpful to know which field changed...
ruhsert
 

Postby maarten » Tue Jun 10, 2003 10:56 pm

Not possible, but we can put it on requested feature list.

May I ask the reason why you would like to build your own logging?
Are there features missing in our tracking system?
(like activation of tracking on fieldlevel?)
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby patrick » Wed Jun 11, 2003 10:44 am

maarten wrote:Not possible, but we can put it on requested feature list.

May I ask the reason why you would like to build your own logging?
Are there features missing in our tracking system?
(like activation of tracking on fieldlevel?)


I think I'd be nice if you had it on the request list (getColumnName)...

When I first played with your tracking it didn't work for some reason. Now it does and looks good. Sometimes though, I have the need to store two primary keys in a log record (e.g. a change, that relates to company and person).

In the meantime I am happy with your tracking system.

P.S.: How do I move the log table to a different database (from Firebird to MS Sql)? Do I have to create the log table first?
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby bcusick » Fri Jun 13, 2003 8:20 am

patrick wrote:
maarten wrote:Not possible, but we can put it on requested feature list.

May I ask the reason why you would like to build your own logging?
Are there features missing in our tracking system?
(like activation of tracking on fieldlevel?)


I think I'd be nice if you had it on the request list (getColumnName)...

When I first played with your tracking it didn't work for some reason. Now it does and looks good. Sometimes though, I have the need to store two primary keys in a log record (e.g. a change, that relates to company and person).

In the meantime I am happy with your tracking system.

P.S.: How do I move the log table to a different database (from Firebird to MS Sql)? Do I have to create the log table first?


Hi Patrick,

Yep - you create the log table and then "point" the connection called "log_server" to the correct database using the correct connection settings.

Hope this helps,

Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby david » Mon Aug 25, 2003 8:51 pm

maarten wrote:Not possible, but we can put it on requested feature list.


Where is this feature on the implementation schedule? I have a situation where being able to trap the current selected field would save me a lot of time:

I start with a method that is called when you enter a field. This field is displayed in a list in a tab panel. The method copies the primary key of the selected row into a field in the table that the tab panel is on (the table has just one record in it...working out a "one-file" system). The method then triggers the correct tab in another tab panel showing the detail of the selected row.

The problem is that I want the user to be able to edit the field which is selected which means I need to requestFocus of the field that was selected after doing all the other stuff. If I could trap for the current fieldname I could use the same method for all the fields.

- david

EDIT: calling elements.fieldA.requestFocus() in the method that is called when you enter fieldA creates a loop. Is there a way to call a method when you enter a field and then leave your cursor in the field when the method is done?
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Postby maarten » Mon Aug 25, 2003 10:44 pm

Hi David,

I'm not sure I'm with you on this part
The problem is that I want the user to be able to edit the field which is selected which means I need to requestFocus of the field that was selected after doing all the other stuff. If I could trap for the current fieldname I could use the same method for all the fields.


Does this mean that when you click on fieldX in your list , the event script shows the details form , and then you directly want focus on the clicked fieldX?
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands

Postby david » Thu Aug 28, 2003 12:28 am

maarten wrote:Does this mean that when you click on fieldX in your list , the event script shows the details form , and then you directly want focus on the clicked fieldX?


Exactly. Leave the cursor blinking in the field that was clicked after a method is run that is attached to the field's onEnter property.
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Postby maarten » Thu Aug 28, 2003 10:30 am

Hi David,

We will add a boolean to the requestFocus method,
that wil give you the option to prevent triggering the onEnter Method again , this way avoiding an endless loop.
Maarten Berkenbosch
User avatar
maarten
 
Posts: 797
Joined: Wed Apr 23, 2003 10:52 pm
Location: Amersfoort, Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 14 guests