PDA

View Full Version : Conditional Style a little quirky?


ABC123

fsi
10-04-2009, 12:05 PM
I'm using Conditional Style (Display Settings & Client Side Properties) pretty heavily in my grid. Up to about two releases ago, it was working beautifully. Then all went haywire. I read the release note about "true" & "false" as it relates to Client Side Properties. Mostly I get false - whether conditions warrant it or not. A "1=1" gives a solid true; using fields generally results in false (in spite of fact that field, displayed on the grid, yields true).

For Display Settings Conditional Style, the first condition properly sets the Style. Subsequent conditions seem to take only **partial** effect. So if my second condition gives (Red, Bold) I will get Bold - but not Red (displayed text color is Blue). The first condition is (Blue, Normal.)

For Client Side Properties Conditional Style, iif(1=1, "true", "false") seems always to give false. I think I got the format right, didn't I? It should always return true, shouldn't it? "1=1" gives solid true, even though it doesn't explicitly return the character string "true".

Having trouble making sense of it all. I saw this some time ago - but it seemed to resolve itself (maybe it was a subsequent release). If anyone else experiences this in latest releases, I'd appreciate a reply.

fsi
10-04-2009, 03:53 PM
Forgot to clarify - in the client side properties, it's the show/hide expression that I'm using the iif with (not so much the conditional style in the client side properties). But Show/Hide, too, seems to be on the fritz. The field is a link (not radio button, as mentioned in a recent release note).

peteconway
10-04-2009, 11:51 PM
Forget the quotes...

iif(1=1, "true", "false")

iif (1=1,true,false)

iif (if answer = 'Yes', true, false)

The syntax in the help and examples is wrong.

Check you are not using capitals e.g. True must be true

fsi
10-05-2009, 10:34 AM
Forget the quotes...
The syntax in the help and examples is wrong.


Well, ain't that just cheeky! Poor little idiot newbie, bashing his head against the wall, trying to get it to work as set forth in the product documentation, just to learn the documentation is wrong.

Thanks, Pete. Now let's see if I can find a dent puller to pop that flat spot on my forehead. ;)


P.S. It was the quotes.... I'd understood lower case was required. But there were the quotes, in the documentation, plain as day. And the very explicit instruction that you must return a "string". What's a guy to do?

Tom Cone Jr
10-05-2009, 10:39 AM
What's a guy to do?I hope you'll submit a formal bug report using the help menu in Alpha Five. Thanks. -- tom

peteconway
10-05-2009, 05:54 PM
Bug was submitted 7 days a go, it will be corrected.

fsi
10-16-2009, 09:52 AM
I had also seen inconsistency in the rendering based on my show/hide expression. Even though the expression returned the correct t/f value, the rendering would sometimes be properly affected, and other times not.

In my field's show/hide expression iif(FieldVal > 0, true, false), where FieldVal was another field in the same row, the expression ALWAYS returned the correct result. This was easily proven by adding a column to the displayed grid and placing the expression result there. But sometimes I'd see a 'false', and yet the field would show. Or sometimes the reverse - a true result, but the field would not show as desired. The rendering results changed based upon selected number of rows to display. So if I displayed all rows, the results were perfect. But if I selected a number of rows to display that resulted in several "pages", ie: click NEXT to view the next page, the rendering was not reliable.

This seems to have been resolved by latest patch
Build 2515-3388 Oct-15-2009