clevow Posted November 19, 2001 Posted November 19, 2001 Is there a way to put more than one criterion in an IF statement? I want to be able to say [fmp-if: field: ProjectDescription .eq. AND field: ProjectName .eq. untitled]. I'm sure this can be done with nested IF statements, but I'd like to avoid that if possible. Although, if I do a nested if, it doesn't seem to work right. I had it as: [fmp-if...][fmp-if...]do this[/fmp-if][else]do this[/fmp-if] I would think that is correct, but it didn't work. Having more than one criterion in the single IF statement is my preference though. Ideas? Thanks, Carrie
Jeff Spall Posted November 19, 2001 Posted November 19, 2001 Hi, keep your [FMP-If] queries as simple as possible and reference calculation fields. You can have nested 'ifs' or a whole load of 'cases' in the calculation field and just deliver yes or no or as the result which your [FMP-If] looks up. Where possible, I try to eliminate [FMP-If]s and deliver the results of calculation fields because they can be indexed and stored rather than being calculated on demand - big speed advantage. regards, jeff
Jeff Spall Posted November 19, 2001 Posted November 19, 2001 Hi, keep your [FMP-If] queries as simple as possible and reference calculation fields. You can have nested 'ifs' or a whole load of 'cases' in the calculation field and just deliver yes or no or as the result which your [FMP-If] looks up. Where possible, I try to eliminate [FMP-If]s and deliver the results of calculation fields because they can be indexed and stored rather than being calculated on demand - big speed advantage. regards, jeff
Simon Posted November 20, 2001 Posted November 20, 2001 you do the following [fmp-if: (ProjectDescription .eq. something).AND.(ProjectName .eq. untitled).OR.(projectdescription.eq.somethingelse)].
MeltDown Posted November 21, 2001 Posted November 21, 2001 Hey SP - If this works, I owe you one. Like Jeff, I try to keep my IF statements simple, and use calc fields. Unfortunately, my solutions have lots of related databases, and calc fields that reference fields from related databases often can't be stored or indexed. I have lots of nested IF statements and plan to play with SP's advice! Thanks!
abkaplan Posted November 21, 2001 Posted November 21, 2001 [ November 20, 2001: Message edited by: abkaplan ]
Recommended Posts
This topic is 8395 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 accountSign in
Already have an account? Sign in here.
Sign In Now