Jump to content
Server Maintenance This Week. ×

Conditional formatting not working in header


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

Recommended Posts

I've got a list layout which allows a user to view a parts stock forecast over a 13 week period, which makes use of conditional formatting to highlight certain aspects of the data.  

 

The body of the list consists of 13 separate calculated fields which represent the stock on hand each week; these are called _cWeek01 through to _cWeek13

 

In the header I have a global repeating numeric field with 13 repetitions; I recalculate the week number based n the current date as needed so, for example, the first rep would contain the week of year for Monday 7th January 2013 (2) and the last rep would contain the value of 14, to represent week of year 14.   Call this _gHeader

 

At the bottom of the layout I have a global numeric variable which contains a value to represent one of the weeks in the current 13 week period - call this _gWeek

 

In the body, I have set conditional formatting on the individual stock on hand fields so that, for example, _cWeek01 would have the conditional test _gWeek = _gHeader[1] and _cWeek13 has the test _gWeek = _gHeader[13].  When the condition is true the field fills pink.  So as the value of _gWeek is changed, the result is a highlighted column in the list.

 

The problem is that if I apply the same conditional formatting to the _gHeader field (which is in the header not the body), it only works for the first repetition, even when the 13 repetitions are displayed individually.

 

You can see this in the two jgp images attached - in week 53, _gweek is set to 53.  post-53652-0-47325300-1357300652_thumb.j

 

In week 2, _gweek is set to 2. post-53652-0-25503800-1357300669_thumb.j

 

The formatting works in the body but not on the header.

 

Any ideas, or is this simply not possible to do?

 

Thanks

 

Brian

 

 

Link to comment
Share on other sites

At the bottom of the layout I have a global numeric variable which contains a value to represent one of the weeks in the current 13 week period - call this _gWeek

 

I presume you mean a field, not a variable?

 

 

 

if I apply the same conditional formatting to the _gHeader field (which is in the header not the body), it only works for the first repetition,

 

What is the exact formula used in the conditional formatting? I believe that =

Self = _gWeek

should work for all repetitions.

Link to comment
Share on other sites

Apologies, yes _gWeek is a global field, not a variable

 

I decided to build a separate test database to test out the problem, and it worked as expected.  When I compared the two databases I realised that _gWeek was defined as a repeating global field_gWeek[30].  When I changed this for another global which was not defined with repetitions, the conditional formatting worked correctly. 

 

So this seems to suggest that conditional fomatting doesn't work as expected if the conditional test depends on two global repeating fields

 

See attached sample database attached  (FMP11)

 

Brian

Conditional Formatting and Repeating Globals.zip

Link to comment
Share on other sites

This topic is 4135 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.