info Button

David Thompson dthmpsn1 at illinois.edu
Sat May 24 10:32:38 PDT 2008


>What I wanted to do was code buttons with something like:  3P where 
>the 3 could be used to call record number 3 and the P could be used 
>to trigger GoForm "P"  (hence the ENDSWITH)
>
>I can easily work around this, but am surprised the ENDSWITH does 
>not work for the Button name.

If the title of your button (not the name of the object) is 3P, then 
clicking it will make the value of info("Trigger") equal to

Button.3P

and you can use

Case info("Trigger") ENDSWITH "P"

or you can use

Case info("Trigger") ENDSWITH "3P"

or

Case info("Trigger") ENDSWITH ".3P"

and they should all work just fine, because all of those conditions 
are true, but if you write

Case info("Trigger") ENDSWITH "Button."

it will skip right over that case, because the condition is false. It 
doesn't end with Button. It begins with it. If the button doesn't 
have any title at all, there won't be anything after the dot, and you 
will be able to use either

Case info("Trigger") ENDSWITH "Button."

or

Case info("Trigger") BEGINSWITH "Button."

and both conditions will be true.

Dave


More information about the Qna mailing list