Computed fields in CSS using ViewTitle

I’m using the following formula in a CSS (notes page) which is part of an embedded sub-form on my viewtemplatedefault and it isn’t working.

I was wondering if viewtitle is available at this level or does the value not become available until after the stylesheet is loaded?

The code is as follows;

.cellnumber { background-color: }

The Computed value is:

ViewTitleText := @UpperCase(@Implode(@ViewTitle;" "));

StandardColour := “rgb(50, 90, 117)”;

HighlightColour := “rgb(0, 0, 0)”;

@If(@Contains(ViewTitleText ; “NUMBER”) ; HighlightColour ; StandardColour)

The idea being that I want to change the background colour of a table Cell to indicate which view a user is currently in.

Subject: Computed fields in CSS using ViewTitle

If you are using as computed field than use css class inside the variable .find below this will workout

ViewTitleText := @UpperCase(@Implode(@ViewTitle;" "));

StandardColour := “.cellnumber{ background-color:rgb(50, 90, 117)}”;

HighlightColour := “”.cellnumber{ background-color:rgb(0, 0, 0)}";

@If(@Contains(ViewTitleText ; “NUMBER”) ; HighlightColour ; StandardColour);

Subject: RE: Computed fields in CSS using ViewTitle

Hi,

Thanks for your input - I tried it but it still didn’t work…

I’ve also tried using the Path_Info variable

StandardColour := “.cellnumber{ background-color:rgb(50, 90, 117)}”;

HighlightColour := “.cellnumber{ background-color:rgb(0, 0, 0)}”;

@If(@Contains(@UpperCase(Path_Info) ; “NUMBER”) ; HighlightColour ; StandardColour)

On some other cells in the same stylesheet, I use a DBLookup, and this works perfectly…

SN := @UpperCase(@DbLookup( “”:“NoCache” ; “”:“” ; “KRetrieval” ; “SystemName” ; 2));

@If(

@Contains(SN ; “CASH1”) ; “rgb(255, 191, 24)”;

“rgb(50, 90, 117)”

)

The problem is that in this case, I need the current view name (or URL) but since it’s not working, I’m wondering if these are available in the CSS (or is the CSS loaded before the view/URL is set?).

Any help would be appreciated…

Subject: RE: Computed fields in CSS using ViewTitle

Kavitha,

Thanks for your help.

I think that the @VIEWTITLE isn’t available in the CSS Stylesheet as I think it loads before the view.

I got around the problem by having computed

text which set the style accordingly.

Thanks.