(De)activate commandbutton based on string in textbox

Viewed 18

In a continuous form I have a textbox that contains a reference number to 1 out of 2 different external applications. About 95% of the time, the reference number refers to Application 1, and about 5% of the time it refers to Application 2.

For Application 1, the reference number contains only digits (e.g.: 12345678) For Application 2, the reference number contains also text (e.g.: AB-123456). The text is always the same, so let's say it is always "AB-"

The form has a command button that will directly link to the reference record in Application 1 (by simple concatenation of a standard intranet address and the reference number in the textbox). However, it is not possible to directly link to the referred file in Application 2 (due to company security settings).

Question: How do I disable the command button if the textbox contains the string "AB-", or if the textbox also contains anything else than digits?

Thanks in advance for the feedback!

0 Answers
Related