harryk Posted June 22, 2002 Posted June 22, 2002 In a start-up script I have some globals which I initialise, by clearing them. I use the command Clear [select,"globalfield"] I found out that the fields are not cleared. I suspect, that the clear command only can be used when the actual field is on a lay-out, or am I wrong? When this is so, of course there are workarounds, using Setfield[global,""], but with date-fields, to empty them completely, (to avoid that question mark in the field) I know of no better way then Clear.. (edited later) In the meantime I found out that the clear command indeed does not work when the field to be cleared is not present on a lay-out. For clearing date-fields in an effective way (not popping up the lay-outs where the date fields are on) I know of no better way then defining an date-global, and keep it empty, and then use Set field[datefield;empty_date_global] Any suggestions to this are welcome. Harry (one of the many Harry's contributing to this board..)
RussBaker Posted June 22, 2002 Posted June 22, 2002 SetField requires that the data to be set is in the same format as the destination field, so Date and Time fields are the usual suspects here... TextToDate ("") and TextToTime("") in the SetField statements will "clear" them for you. If you use Clear, you will get ? for date and 0:00:00 for time.
Recommended Posts
This topic is 8295 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now