September 18, 200520 yr The Step is for a Calculation with result container. I.e. If ( File not found; pic a ; pic ... Whats the step that fits in File no found... Cheers, genx
September 18, 200520 yr If I'm understading what you are asking, try: Case(IsEmpty(Field1); pic a; pic or Case(not IsEmpty(Field1); pic a; pic HTH Lee
September 18, 200520 yr My experience is that a container field still holds the path in 7, even if the file is missing.* That makes it difficult to find out if the file is still there. I've found a couple ways to find out. One is to use AppleScript, in a script, to see if the file exists. The other is to use Troi File plug-in and the FileSize function. Troi has the advantage that it is cross-platform, and can return the result as an unstored calculation (it returns an error if the file is missing), making it a little easier to search. If anyone knows other methods please jump in, as this is a common need. *A test is especially needed when you're using a calculation field, as the poster was. Because it is evaluated for each record. So even if you never move any files, you're still in the dark about what's there and what isn't. Of course you can tell by visually scanning a list. Troi_ImagePath.zip
September 18, 200520 yr Hi Fenton, It sound to me like they were wanting to display graphic in a container field based on whether or not another filed contained data. If it is the container field that they are testing, then I agree they will need to approach this different. That's why my disclaimer of If I'm understanding...... In fact, I almost responded differently by requesting that they give more detail in what they have and what they wanted to accomplish. Lee :)
September 20, 200520 yr Author right, basically, i have 8 picture 'slots'... each one is a calculation with a result container that has a file path that leads directly to the file. Surely file maker itself must have some sort of ability to display something else if the file isnt found, i mean it always says "file bla bla couldnt be located"... Anyway, if not, thanks for you help anyway
September 20, 200520 yr No, it can't show anything else. And in versions 7-8 it cannot natively calculate whether the picture is really there or not. Of course, it couldn't calculate to show the picture at all in 6, so you win a few, you lose a few. I'm sure there's a reason why. But it would be nice to have a Get function with access to that status. If anyone knows different please let us know.
November 23, 200619 yr Author RE this... I use two fields. 1) Container Field (used for storage only) 2) Calculation field (used for display) with the simple case statement lee provides above: Case( IsEmpty(MyContainerField) ; EmptyPic ; MyContainerContents )
Create an account or sign in to comment