ngwaltne Posted April 8, 2003 Share Posted April 8, 2003 I have this working for "CL", now I want to add checks for other letter combinations. Such as DL-N, Dl-A etc... How do I add these other tests. I am pretty new at this so I imagine it is easy. If(PatternCount(ling_2, "CL") > 0, cl_bar_image, "") Thanks for your help in Advance norm Link to comment Share on other sites More sharing options...
danjacoby Posted April 8, 2003 Share Posted April 8, 2003 Assuming that you want to enter another image if one of the other tests is met, the best way is to use the "Case" funtction: Case(PatternCount(ling_2, "CL") > 0, cl_bar_image, PatternCount(ling_2, "DL-N") > 0, dl-n_bar_image, "") Of course, you can put in as many tests as you want. Link to comment Share on other sites More sharing options...
ngwaltne Posted April 8, 2003 Author Share Posted April 8, 2003 Thanks for your quick reply. Here is what the calc looks like. However it does not seem to work. The field were the CL comes from (lin_2) is a popup menu. Does this matter? I go to the layout with the CL or Dl-N and go back to the container field and the image has not loaded. Any ideas? Case(PatternCount(ling_2, "CL") > 0, cl_bar_image, PatternCount(ling_2, "DL-N") > 0, dln_bar_image, PatternCount(ling_2, "DL-A") > 0, dla_bar_image, PatternCount(ling_2, "DL-J") > 0, dlj_bar_image, "") Thanks for your help in Advance norm Link to comment Share on other sites More sharing options...
ngwaltne Posted April 8, 2003 Author Share Posted April 8, 2003 I just went to the layout to check on the container fields to see if the images were there, and they were gone. Not sure what's up. Thanks for your help in Advance norm Link to comment Share on other sites More sharing options...
danjacoby Posted April 9, 2003 Share Posted April 9, 2003 Um, it occurs to me -- why use PatternCount? Why not use "="? Case(ling_2 = "CL"), cl_bar_image, etc. Link to comment Share on other sites More sharing options...
DykstrL Posted April 12, 2003 Share Posted April 12, 2003 To test your calculation, try duplicating the calcuation field and make the result a number: Case(PatternCount(ling_2, "CL") > 0,1, PatternCount(ling_2, "DL-N") > 0,2, PatternCount(ling_2, "DL-A") > 0,3, PatternCount(ling_2, "DL-J") > 0,4,5) See what number displays. I'm guessing here, that the calculation is working, but none of the case statements are true, so the "" is displayed. Can "ling_2" field contain more that one value? - if so, try reworking your calculation to trap false statements instead. If the "ling_2" field contains only a single value, try narrowing the cases: Case(PatternCount(ling_2, "C") =1, cl_bar_image, PatternCount(ling_2, "N") =1, dln_bar_image, PatternCount(ling_2, "A") =1, dla_bar_image, PatternCount(ling_2, "J") =1, dlj_bar_image, "") Link to comment Share on other sites More sharing options...
ngwaltne Posted April 16, 2003 Author Share Posted April 16, 2003 Thanks for all your help this worked out great, so far. Haven't run into problems and I am getting a graphic representation of data. Nice. norm Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 7845 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