July 20, 200421 yr 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
July 20, 200421 yr 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
July 21, 200421 yr 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.
July 21, 200421 yr Author 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?
July 21, 200421 yr Author Yeah I've given up and solved it using PHP for the time being. Pretty annoying. I'll let you guys know if it works.
Create an account or sign in to comment