on 05-16-2008 9:47 AM
Hi all,
I've got a table with a field "Status" and a field with a button. If there is a value "Available" in the "Status" field
the button has to be enabled. If not it has to be disabled.
At the properties of the button I have chosen "Disabled" and entered the condition.
The condition is: 'IF(@Status == "Available",false,true)'.
But there is an error message: 'Expected boolean value/expression'.
How is the right syntax to do so?
Thanks in advance
Kind regards, Frank.
Hello Frank,
the disabled function of the button needs a booelan value. The IF condition don't give you an boolean value, but an text value. Therefore you get the error message: 'Expected boolean value/expression'
There are two possibilities to do it an a correct way:
- BOOL(IF(@Status == "Available",false,true))
--> Bool converts a Text to a Bool-value
- @Status == "Available
--> This statment gives back a boolean
Kind regards
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
thanks for your help. The expression is now correct.
But now in each row the button is disabled even if the status is "Available".
The buttons in the rows with "Available"-status should be enabled and the buttons
in the rows with non-"Available"-status should be disabled.
It seems the test takes no effect.
Regards, Frank.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.