Skip 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.

FMP-If in Portal help!(Using CDML served by lasso)

Featured Replies

My database is being served by lasso, and I'm using CDML. There are some minor syntax changes when using portals, and I can't get an FMP-If statement to work.

When using a portal, it would be incorrect to use [FMP-Field:PortalName::FieldName]. You would receive an error pointing to the double colon. Lasso recognizes [FMP-Field:"PortalName::FieldName"] syntax instead.

When I finally got an image to display from a field, the syntax again was an issue. The html that worked was <img src=[FMP-Field:"PortalName::FieldName"]> and not <img src="[FMP-Field:"PortalName::FieldName"]"> OR <img src="[FMP-Field:PortalName::FieldName]">

So now my problem is that I can't figure out the correct syntax for an [FMP-IF]...

Here's what I am trying to do. I want to display a button if the item color is in stock, and "Out Of Stock" if the available item quantity is 0. The field "Item_Qty" is a number and is on the layout I'm using (in the portal).

The following syntaxes do NOT work:

[FMP-If:Field:PortalName::Fieldname.eq.0]

[FMP-If:Field:"PortalName::Fieldname".eq.0]

[FMP-If:PortalName::Fieldname.eq.0]

[FMP-If:"PortalName::Fieldname".eq.0]

In the statment

[FMP-If] (statements above)

Out of Stock

[FMP-Else]

Add To Cart

[/FMP-If]

I will be trying FMP-Ifs outside of a portal to see if I can get it to work. I haven't yet found the proper CDML/Lasso syntax. If anyone else has worked with CDML served by Lasso and has run into similar syntax issues, please let me know what your syntax changes were. Thanks!

  • Author

Okay... here's the correct syntax (very different than I'd expect)...

[if:(FMP-Field:'Colors::Item_Qty')='0']

Out Of Stock

[Else]

Add To Cart

[/if]

The FMP must be removed before the "IF" tag, and doesn't matter if it appears in FMP-Field. It's definately a LDML/CDML hybrid. I'm just happy that it works. Thanks to the LassoTalk archives at blueword.com for the solution. Now I can go back and do my multiple columns and rows (...from another post, and I've completely changed my databases!)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.