Viddar Posted July 18, 2005 Posted July 18, 2005 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?
RalphL Posted July 18, 2005 Posted July 18, 2005 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.
Viddar Posted July 18, 2005 Author Posted July 18, 2005 that doesn't work. even when a picture is present, the text always appears over it.
Lee Smith Posted July 18, 2005 Posted July 18, 2005 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:
Ocean West Posted July 18, 2005 Posted July 18, 2005 Create a display field calculation. If( isempty(picturefield);"SOME TEXT WHEN EMPTY"; "")
Viddar Posted July 18, 2005 Author Posted July 18, 2005 (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 July 18, 2005 by Guest
Viddar Posted July 18, 2005 Author Posted July 18, 2005 (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 July 18, 2005 by Guest
-Queue- Posted July 18, 2005 Posted July 18, 2005 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.
Viddar Posted July 18, 2005 Author Posted July 18, 2005 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.
-Queue- Posted July 18, 2005 Posted July 18, 2005 (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 July 18, 2005 by Guest
Viddar Posted July 18, 2005 Author Posted July 18, 2005 I've never seen that file extention before, nor do I have a program that will open it...
Viddar Posted July 18, 2005 Author Posted July 18, 2005 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?
RalphL Posted July 18, 2005 Posted July 18, 2005 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.
Viddar Posted July 18, 2005 Author Posted July 18, 2005 No worries... I can't install new programs on this computer anyway. I'm at work...
Viddar Posted July 18, 2005 Author Posted July 18, 2005 I can't install new programs on this computer so that file won't help me out. Thanx anyways...
RalphL Posted July 18, 2005 Posted July 18, 2005 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.
Viddar Posted July 18, 2005 Author Posted July 18, 2005 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)
-Queue- Posted July 18, 2005 Posted July 18, 2005 Here's a zipped version of Ralph's file. Viddar.zip
Viddar Posted July 18, 2005 Author Posted July 18, 2005 LOL... I don't even have winzip on this computer. I know it comes standard with XP but we are still running 2KPro...
-Queue- Posted July 18, 2005 Posted July 18, 2005 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).
Viddar Posted July 18, 2005 Author Posted July 18, 2005 (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 July 18, 2005 by Guest
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now