Morph not working


#1

So I know this is going to be a vague question, but why can’t I get Morph to work for me with more than one command? Here’s what I’m trying to do which is fairly straightforward:

I have column of numbers in a file. Most are positive, but a handful are negative numbers. I need to convert them all to positive numbers and remove any that are zero… No problem, I’ll use the abs( and zeroblank( commands in the Morph dialog.

But when I stack them both in the Morph Current Field dialog box, nothing happens. I can execute them both individually and then they work, but this doubles the time to do this.

I suppose I could try writing a procedure for this and see if that works. But any other thoughts on this matter?

Just a small slightly annoying glitch.

Peter


#2

This works for me. What does your dialog look like?

The preview shows a zero, but when I execute it, the zero is blanked in the field, as it should be.


#3

Well, the data I’m affecting is off the bottom of the Morph dialog box since it only shows the first 150 records. But when I have two Formula lines, one for abs( and one for zeroblank( and I click Morph, nothing happens in the Datasheet. If I do just one “Formula” line and click Morph, it works.

Now, I had not recently tried the nested commands as you have it, because I had tried that last fall and gotten an error message. Of course I retried that now and it works. Sigh.

Maybe I made a typo before or maybe some bug has been corrected since then.

I guess I don’t need to take up more bandwidth here since the nested formulas works. But theoretically there may still be an issue with running two Formula lines from the Morph dialog box.

Thanks,

Peter


#4

I wasn’t as much interested in the results, as I was the setup. This also works for me.


#5

If you stack formulas like that, you’ll have to be careful to do it as Dave did with the «◊». If you used the original field names in both formulas, it would not work because the first formula would just wind up being essentially ignored. Personally I would just put it all in one formula, and usually I would just make a short procedure to do this

formulafill abs(zeroblank(A))

#6

What does that symbol «◊» mean? I am not familiar with it? Tom


#7

Thanks, Jim. This makes sense. I’ll probably go the procedure route since I’ll continue to have to massage this data in the future as new data is imported.

Peter


#8

It’s something the _MorphFieldLib:MorphButton procedure is using as a placeholder. That procedure is building a formula for a Select statement, using the information in that dialog.

The symbol stands for the formula that has been built from the lines above. That formula will be nested within the formula you write on the current line.

When you choose Formula from the popup menu, it starts with that symbol (a lozenge between chevrons) already written for you, so that you can write your formula around it.