January 4, 201313 yr 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.  In week 2, _gweek is set to 2.  The formatting works in the body but not on the header.  Any ideas, or is this simply not possible to do?  Thanks  Brian  Â
January 4, 201313 yr 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.
January 7, 201313 yr Author 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
January 7, 201313 yr Within a repeating field, a reference to another repeating field looks at the corresponding repetition. The attached should hopefully make it clear. Conditional Formatting and Repeating2 Globals.fp7.zip
Create an account or sign in to comment