Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7070 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have no Idea where this post belongs but I'm going to put it here. Feel free to move it if it should be somewhere else...

I have a container (picture) field and I want to have some text show in the field if no picture is present. How do I do this?

I was looking in the help section and came across the IsEmpty function. I've tried using it but I can't get it to work for me. Can someone help me out?

Posted

If it is the same text for every record go to the layout mode and enter it there. Push it as far back as posible so picture will cover it.

Posted

Layout Mode >> Select the Text >> Main Menu >> Arrange >> Send To Back.

Now the text will be behind your Container Field. Be sure your Container Field has no Fill.

HTH

Lee

:bigshades:

Posted

Create a display field calculation.


If( isempty(picturefield);"SOME TEXT WHEN EMPTY"; "")

Posted (edited)

I've tried this too but it doesn't work.

I'm using version 5.5

If I copy and paste that script (editing it with my field and text, of course) it errors out with either too many seperators or operators or will say this field cannot be found (and it highlights ;"No Photo on File"; "" )...

EDIT:

I just noticed that you said create a calculation.

How do I do that? Do I just edit the current field definition or make a new one?

Edited by Guest
Posted (edited)

It still says "this field cannot be found" and highlights the last half of the code...

I hate to ask but can you hold my hand please?

I'm wanting the text to appear in the Photo field when no photo is present.

Edited by Guest
Posted

If( IsEmpty(picturefield), "SOME TEXT WHEN EMPTY" )

Substitute your field name for 'picturefield'. Commas are usually used in place of semicolons in 5.5, depending on your language version.

Posted

I've done that.

It still errors out on me.

Let's start from scratch.

I've got a normal container field I'm using for pictures. What are the steps I need to go through to have text show up when no picture is present?

Do I need to make a script and redefine the field or just redefine the field? I'm confused, I haven't even been using this program a week yet.

Posted (edited)

Oops. For 5.5, you should use

Case( IsEmpty(picturefield), "SOME TEXT WHEN EMPTY" )

since If requires a false result.

Create a new calculation field with this result. Do not modify your existing container field.

Edited by Guest
Posted

OK...

I went into File > Define Fields

I made a new Calculation Field ( named it No Pic)and pasted your code in it.

The Picture Field is still blank when no picture is there.

Did I do something wrong?

Posted

That is a compression. You should be able to download a program at http://www.stuffit.com that will expand it. But the example will not help you since it is FMP 7. Sorry I missed that you are using FMP 5.5.

Posted

Let me try to talk you through this.

Make a new filemaker file, name it Viddar.fp5

Define a field Picture as a container field.

Define a field Message as a calculation field. Make it a text calculation. The calculation is Case(IsEmpty(Picture),"Message you want to show").

Quit the define fields.

Go to the layout mode.

Move the message field up into the container field.

Click on the text pointer (The A)

Put the cursor inside the conatiner field and type another message.

Chose this text and then go to Arrange - Send to back.

Now go to browse mode.

Both message should show.

Selete the container field and insert an image, both messages should be hidden.

Posted

Sorry Ralph,

I followed your directions and the text still wouldn't show.

It sounds like your trying to get the text between the container (picture) field and the image itself. That looks to be impossible as the image is a part of the field containing it. (Hence, container field)

Posted

I made a new Calculation Field ( named it No Pic)and pasted your code in it.

The Picture Field is still blank when no picture is there.

As it should be. You need to put the NoPic field on the layout, either behind the container field (with the container field set to have no background fill) or in front of the container field (with the calc field set to have no background fill).

Posted (edited)

Sounds good.

How do I get a transparent background?

I don't see that option when I select then right-click, fill color the field. I get to choose from white, black or anything inbetween.

EDIT:

I got it!

It was in the Fill Pattern menu. I just changed that thing, move things backward and that did the trick.

Thanx ppl! :

Edited by Guest

This topic is 7070 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.