Skip to Content
author's profile photo Former Member
Former Member

How to disable a button by using conditions

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 16, 2008 at 10:15 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.