Lookup only if cell not empty

What is the simplest way to limit lookup to operate only where the compared cell is not empty?

Select the records whose compared fields (cells) are not empty and then use lookupselected(

santafestan, because you did not state the starting condition, here’s an addition to the method suggested above. … This is an old-timey way of doing things; PanX may have better tricks. But if you have a spare field in your database, before you select the non-empty records to do the lookup, you can fill that field in your current selection with some character, like “*”. Then you can do the non-empty selection and lookup. When that’s completed, you can select that field/character to get all the records you had before. As a last step, use a formulafill to clear your extra field so it will be available the next time you need to use it.

You might stumble across the ?(comparison, True, False) function and think you can check for non-empty in the comparison and use some lookup construction as the true parameter. But that function doesn’t test then act, it acts, then tests. Or that’s how it used to work. For example, let’s say you had 100 records that contained an apple color, red, green, or yellow. If the apple was green, you wanted to add 9 + 3, if the apple was not green you wanted to add 2 + 5. The ?( function would calculate both 9 + 3 and 2 + 5 for all the records, then it would go back and check if the apple in the record was green. If green, it would return 7, if not it would return 12.

But you see you didn’t save anything because it doesn’t do a selection to reduce the number of records it acts upon.

Again - that is way old “technology”. But Marking the records it the current state, selecting those you want to mess with, mess with them, then select the current state back using the Mark (and clearing the Mark afterward) will get the job done PDQ (Latin for “Pretty Darn Quickly”).

Since Panorama X has multiple undos you can simply use that to go back to the previous selection. If the new selection is don with a procedure you can use the startdatabasechange statement in the procedure before the new selection to undo it.

I was working on the idea that the user wanted to keep - not undo - the result of the lookup but after the selection and lookup result, return to the previous selection (keeping the lookup result) - which is not the same as undoing. But Yeah, if it’s just a “look-see”, then undo to ~“get back Loretta”~.