Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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

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

  • Author

Actually what I am trying to say is:

If the item has a picture (the picture name is in a related field) show it,

If not put in another (blank) image (blank.gif)

Am I being clear? or am I making no sense?

Thanks

IM

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.

  • Author

Thanks for all the input. Believe it or not it was just a dumb error. I only had one colon in the relationship portion. Sometimes it is just best walk away, sorry to waste any of your time.

....I sympathise here. If i could spell fieldnames right, my pages would work better smile.gif" border="0

Jeff

Jeff, yes fieldnames (or field) when spelled filednames (or filed) always spell-checks correctly. The answer may be to search your document for filednames (or filed). ;-)

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.