June 22, 200223 yr 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..)
June 22, 200223 yr 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.
Create an account or sign in to comment