Raas
Raas

Reputation: 261

Selecting a record in Dropdown should throw error based on value in the record

HI I have a dropdown for a field in a form which shows records with each record having values (Name, Status).

Ex:: A1 Active

 A2  Active
 A3  Inactive
 A4  Active
 A5  Inactive

If i select A3 or A5 which are inactive i should get a warning/error saying you are selecting inactive value.

How can i acheive this? What is best way to acheive this? Thanks in advance.

Upvotes: 1

Views: 143

Answers (2)

Jan B. Kjeldsen
Jan B. Kjeldsen

Reputation: 18051

What about using validation?

Using validateField or validateWrite on the table or datasource you can test whether the chosen value is valid.

Also the validate method on the datasource or control could be used.

Search the Tables or Forms node of the AOT for thousands of examples.

Upvotes: 0

Matej
Matej

Reputation: 7627

On the FormDataSource override the active method. Reference to current record is by datasource name.

Upvotes: 0

Related Questions