July 18, 200520 yr 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?
July 18, 200520 yr 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.
July 18, 200520 yr Author that doesn't work. even when a picture is present, the text always appears over it.
July 18, 200520 yr 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:
July 18, 200520 yr Create a display field calculation. If( isempty(picturefield);"SOME TEXT WHEN EMPTY"; "")
July 18, 200520 yr Author 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, 200520 yr by Guest
July 18, 200520 yr Author 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, 200520 yr by Guest
July 18, 200520 yr 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.
July 18, 200520 yr Author 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.
July 18, 200520 yr 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, 200520 yr by Guest
July 18, 200520 yr Author I've never seen that file extention before, nor do I have a program that will open it...
July 18, 200520 yr Author 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?
July 18, 200520 yr 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.
July 18, 200520 yr Author No worries... I can't install new programs on this computer anyway. I'm at work...
July 18, 200520 yr Author I can't install new programs on this computer so that file won't help me out. Thanx anyways...
July 18, 200520 yr 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.
July 18, 200520 yr Author 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)
July 18, 200520 yr Author LOL... I don't even have winzip on this computer. I know it comes standard with XP but we are still running 2KPro...
July 18, 200520 yr 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).
July 18, 200520 yr Author 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, 200520 yr by Guest
Create an account or sign in to comment