Clear Statement Does Not Work

The clear statement does not seem to work in my procedure.

When I use the command from the menu Field > Morph > Clear Field, then the command works as expected.

I think the documentation needs some clarification. The Clear command only deletes the current cell, which is exactly what it did in Panorama 6. In my test, it did that. Choosing Field > Morph > Clear Field clears every visible cell in the field.


I think the clear statement does have some other problems. If I have a field and run the clear command it will remove the current field for that record. If I then move up or down a record it blanks that field for that record as well. It continues to do this even if I go to another field and come back again. If I go to a procedure window and then back to the datasheet it no longer exhibits that action.

I thought that was the purpose of the clearcell statement. But the documentation uses a quite similar description for both statements.

Some additional info. I noticed that if you move to another field then that field will also be cleared. It is almost like the clear statement is stuck in the on position and keeps firing in whatever cell it is in. I put a message statement after the clear statement and the message never appeared until I left the datasheet and activated the procedure window.

What do you suggest for clearing a field (column) of data?

My fields are integer numeric, and I tried formulafill zeroblank(0), but that was not completely successful. Some zeros were left in the data sheet.

When I read your first reply, I thought the procedure was moving from record to record, and I tested with this code

Field A Clear DownRecord DownRecord DownREcord

It cleared field A in the first record, but the DownRecord statements never happened.


For the moment, ClearCell seems to be the only thing working correctly. You could write a loop and step down from record to record until info(“stopped”) and use ClearCell. Your FormulaFill should have worked, and so should

Fill ""

which worked in Panorama 6, but neither do.


I’m guessing this hasn’t been fixed yet. I can go through the menu tree to Morph a Clear Field, but haven’t found a way to clear the field otherwise.

I have a couple thousand records and I alphabetize and apply a sequence to a subset of active people, but I don’t want a sequence number in that field for the subset of inactive people. My tentative procedure was to clear the field, select actives, sort them, and then apply the sequence #. Guess I’ll have to do a formula fill or something…

Yep formulafill zeroblank(0) does what I need.

Nothing to see here, now, so we can just move along. Actually, I’m thinking it might be good for me to Morphacize myself so I understand how to get Morph operations integrated into my little procedures and macros.

Clicking a field and entering a formula in the dialog is basically the same as using something like this in a procedure:

field YourField
formulafill YourFormula