Browser Question

Jenie888

Member
I have a set of Time fields, we will say
TableName.ArriveTime Char X(8)
TableName.DepartedTime Char X(8)

The data inside these fields look like the following (Military Time)
0400
1200
1300
0800

I placed these fields in a Free-Form Query Browser, as editable fields.
Display Trigger:
TableName.ArriveTime
TableName.DepartedTime

enable
ArriveTime
DepartedTime

I want the display to always have 4 digits, so if the user enters 400, it should read 0400. I figured instead of doing a data fix or a correction, I could rap the fields with an INT() statment, although when I enable them it errors out.
Display Trigger:
INT(TableName.ArriveTime ) COLUMN-LABEL "Arrived" FORMAT ">>>9":U
INT(TableName.DepartedTime ) COLUMN-LABEL "Departed" FORMAT ">>>9":U

enable
INT(ArriveTime)
INT( DepartedTime)


Aside from changing the data type in the database, does anyone have any suggestions on how to do this? Or maybe know what I am doing wrong?
 

vinod_home

Member
Hi,

Speicfy your fields as format '9999', you would normally get an error if the field is half filled. But you should be able to capture the error in 'on leave of field' and then fix the field based on the format you want. You dont have to change the database or use the int() to the fields.

HTH
V
 
Top