April 8, 200322 yr 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
April 8, 200322 yr 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.
April 8, 200322 yr Author 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
April 8, 200322 yr Author 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
April 9, 200322 yr Um, it occurs to me -- why use PatternCount? Why not use "="? Case(ling_2 = "CL"), cl_bar_image, etc.
April 12, 200322 yr 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, "")
April 16, 200322 yr Author 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
Create an account or sign in to comment