Jump to content

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

Recommended Posts

Posted

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!

Posted

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!)

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