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.

How to use the value in a valuelist in an if statement?

Featured Replies

Hi:

I want to use a value in a valuelist to decide whether or not show a record in a result page. Say: I have a valuelist "Room_Booked", the values in it are "Yes" and "No". I want to show the records with "No" in "Room_Booked". I used:

code:


[FMP-If: Room_Booked.eq.No]

[FMP-Record]

...

[/FMP-Record]

[/FMP-If]

It didn't work, how should I deal with it?

Thanks in advance!

Catty

Hi, I can't see anything wrong with that reasoning.

here's one from our own room booking system:

[FMP-IF: availableam.eq.available]

[FMP-INCLUDE: am.txt][FMP-ELSE]

[FMP-INCLUDE: blank.txt]

[/FMP-IF]

you can substitute

[FMP-Record]

.fields and portals and stuff..

[/FMP-Record]

for the includes, no problem.

Can I suggest a troubleshooting test?

Split up the code.

Have the records display on their own, and just try:

[FMP-If: Room_Booked.eq.No]

---working OK---

[/FMP-If]

If they both work, you can put the code back together, if they don't you'll know where the problem lies

regards, jeff

  • Author

Thanks Jeff!

I got it! I did like this:

code:


[FMP-Record]

[FMP-if: Room_booked.eq.No]

...

[/FMP-if]

[/FMP-Record]

Catty

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.