January 10, 200521 yr I have a rather long case function... Lots of and's between statements. I have notices that when I go to store (unclick do not store option under calc) it does not let me. I have other case function which are shorter that I can store or index... So my question is why can't I store and or Index a case function like this: Case ( File_Status_Broker = "Yes" and File_Status_LT = "Yes"; "Yes"; File_Status_Broker = "No" and File_Status_LT = "No"; TextColor("No";RGB(255;0;0)); File_Status_Broker = "No" and File_Status_LT = "Yes"; TextColor("No";RGB(255;0;0)); File_Status_Broker = "" and File_Status_LT = ""; "Yes"; File_Status_Broker = "" and File_Status_LT = "No"; TextColor("No";RGB(255;0;0)); File_Status_Broker = "" and File_Status_LT = "Yes"; "Yes"; File_Status_Broker = "Yes" and File_Status_LT = ""; "Yes"; File_Status_Broker = "Yes" and File_Status_LT = "No"; TextColor("No";RGB(255;0;0)); File_Status_Broker = "No" and File_Status_LT = ""; TextColor("No";RGB(255;0;0))) PS: IS there a shorter way to do this statement? Joseph
January 10, 200521 yr This is shorter (but probably not shortest): Case ( File_Status_Broker = File_Status_LT and File_Status_Broker = "Yes"; "Yes"; IsEmpty(File_Status_Broker) and File_Status_LT = "Yes" or IsEmpty(File_Status_LT) and File_Status_Broker = "Yes"; "Yes"; not IsEmpty(File_Status_Broker) or not IsEmpty(File_Status_LT); TextColor("No";RGB(255;0;0)) ) It doesn't have, nor need a "" at the end; it's implied; it's empty if neither have an entry. One or the other of your fields is either a global, a related field, a calculation depending on one of those types, or an auto-enter depending on a calculation referencing one of those types. The last is hard to predict. In fact I may have not stated it exactly right.
January 10, 200521 yr Case( PatternCount( File_Status_Broker ; "no" ) or PatternCount( File_Status_LT ; "no" ) ; TextColor("No" ; RGB ( 255 ; 0 ; 0 ) ) ; TextColor("Yes" ; RGB ( 0 ; 0 ; 0 ) ) )
January 10, 200521 yr Author Thanks for the answer... I am trying to make a portal on a page using that field... as you can see it is a simple case function that looks at several different fields... I just do not know why my portal does not work with a calc field... It works well with just a text field from the same table just not that field.... Is there a way around this? Joseph
Create an account or sign in to comment