Accept rule

Official Content
This documentation is valid for:

Variables are read-only by default in transactions. If you need to modify this behavior so that the user can enter a value for a variable, you have to use this rule.

Syntax

Accept(&var [ , att ] );

Where:

&var
    Is the variable defined in the transaction and present in the screen in order to accept a value. It could be a SDT variable and in this case just writing Accept(&var) is enough to enable all the SDT elements.

att
    Is an optional attribute that you can specify, to help to determine in which level the variable must be considered (for example if the variable participate in a formula). If att is not specified, then the first level is assumed.

Description

This server rule allows you to accept a variable at the transaction level where the Attribute att is found. The order in which data is entered for a certain level depends on the order in which the variables and attributes have been positioned on the screen. If att is not specified then the first level is assumed.

Example

Customer
{
  CustomerId*
  CustomerName
  CustomerAddress
  CustomerPhone
  CustomerPassportNum
}

Customer rules:

Accept(&Print);
Ticket.call(CustomerPassportNum) if &Print='Y';


Scope

Objects Transaction object
Languages .NET, Ruby, Java, RPG, Visual FoxPro, Cobol
   





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.