Jump to content

Can I use a relationship w/ an If/Else?


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

Recommended Posts

Ok, I've gotten the if/else thing down pretty good, as well as the relationship thing. Combining them is a different story.

Am I close?

[FMP-If:RELATIONSHIP2 tongue.gif" border="0hoto1.neq.]

<img src="http://www.XYZCOMPANY.com/XYZpicts/[FMP-FIELD: RELATIONSHIP2: tongue.gif" border="0hoto1]">

[FMP-Else] <img src="http://www.XYZCOMPANY.com/images/empty.gif">

[/FMP-If]

Any help would be greatly appreciated. crazy.gif" border="0

Link to comment
Share on other sites

Hi, are you trying to say that if the field is not empty, return the picture?

I don't think that the the problem is with the relationship, but that the 'neq' conditional isn't working with a blank.

I do this one by returning a calulation field from the database for the picture which is:

If(IsEmpty(imagename),"images/"&"zero.gif", "images/"&imagename)

This might have the advantage of being stored rather than generated each time like an "If" (is this right???)

regards, Jeff

Link to comment
Share on other sites

Hi, that's what I thought you were trying to do!

So, if you have no picture, then the 'photo1' field is empty?

I still think that this is the problem with using the 'If' statement - it can't work with the blank after 'neq.' - so I come back to thinking that it's an easier work-around to do the calculation in the related database and use that field.

Jeff

PS: I have some examples of this if I'm not bieng clear.

Link to comment
Share on other sites

This topic is 8418 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.