Joseph31 Posted January 10, 2005 Posted January 10, 2005 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
Fenton Posted January 10, 2005 Posted January 10, 2005 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.
Vaughan Posted January 10, 2005 Posted January 10, 2005 Case( PatternCount( File_Status_Broker ; "no" ) or PatternCount( File_Status_LT ; "no" ) ; TextColor("No" ; RGB ( 255 ; 0 ; 0 ) ) ; TextColor("Yes" ; RGB ( 0 ; 0 ; 0 ) ) )
Joseph31 Posted January 10, 2005 Author Posted January 10, 2005 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
Recommended Posts
This topic is 7413 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