Jump to content

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

Recommended Posts

Posted

OK, I'm trying to return a value list from my database.

But in my format file I'm trying to something involving an if statement.

I have...

[FMP-ValueList: press CLASSIFICATION, List=press CLASSIFICATION]

at the start to loop through the value list items.

And for each I'm trying to do this...

[FMP-If: ValueListItem .cn. test]

<a href="http://www.domain.com/foo.php?classification=test">[FMP-ValueListItem]</a>

[FMP-Else]

<a href="http://www.domain.com/foo.php?classification=normal">[FMP-ValueListItem]</a>

[/FMP-If]

[/FMP-ValueList]

But it isn't working. I'm trying to say, if the current value list item contains the word test, then do one thing, else do the other thing.

Is this possible?

Has anybody else managed this?

Thanks

Posted

I remember something about ValueLists and FMP-Ifs being a problem. I think the solution may have been to use Javascript Ifs.

It maybe worthwhile to do some more testing as this is just a vauge memory.

Good Luck.

Garry

Posted

From what I read in the CDMLRdb you might try using:

[FMP-If: FieldNameinwhichyouhavetheValueListItem .cn. test]

since, according to the CDMLRdb:

"ValueListItem - Returns the current value list item"

unless the latter is what you desire.

Posted

What I'm trying to do is detect whether the current value list item contains certain text.

Because I am looping through the value list using

[FMP-ValueList] and [/FMP-ValueList]

For the time being I've solved the problem using PHP, but I'm sure I'll need to do something involving this at some point.

I've tried getting the field value, but for that particular record that valuelistitem might not be selected.

Any other ideas?

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