Jump to content

This topic is 7413 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

Case(

PatternCount( File_Status_Broker ; "no" ) or

PatternCount( File_Status_LT ; "no" ) ;

TextColor("No" ; RGB ( 255 ; 0 ; 0 ) ) ;

TextColor("Yes" ; RGB ( 0 ; 0 ; 0 ) )

)

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.