AnsweredAssumed Answered

Blank Field in a script problem

Question asked by philgallet on Feb 17, 2019
Latest reply on Feb 19, 2019 by onefish

Hi all,

In this Scipt, all of the case types work correctly exept when FieldA and FieldB are both blank.

None of them seem to work and leave the field as blank.

I've tried every combination I could think of, so I've included all of them.

I tried using If statements, but that returns the same.

What am I missing?

 

3 Fields :- Name, FieldA, FieldB

Scipt:-

Case (FieldA = "Y" and FieldB = "Y";TextColor(Name;RGB(128;0;255));

           FieldA = "N" and FieldB = "Y";TextColor(Name;RGB(255;0;255));

           FieldA = "N" and FieldB = "N";

              Case(Items = 4;TextColor(Name;RGB(0;0;255));

                        Items = 3;TextColor(Name;RGB(8;16;130));

                        Items = 2;TextColor(Name;RGB(255;0;0));

                        Items = 1;TextColor(Name;RGB(128;56;0));

                        Items = 0;TextColor(Name;RGB(8;16;130));

               FieldA = "" and FieldB = ""  or FieldA = " " and FieldB =" " or

                FieldA = " " and FieldB = " " or IsEmpty(FieldA) and IsEmpty(FieldB);

                   Case(Items = 4;TextColor(Name;RGB(0;0;255));

                             Items = 3;TextColor(Name;RGB(8;16;130));

                             Items = 2;TextColor(Name;RGB(255;0;0));

                             Items = 1;TextColor(Name;RGB(128;56;0));

                             Items = 0;TextColor(Name;RGB(8;16;130));

TextColor(Name;RGB(0;0;0)))))

Outcomes