GXYiNoacceptMultipleAttributes

Unofficial Content
GeneXus 9.0 Upgrade Course

Noaccept in Multiple Attributes

Scope

Languages: All
Objects: Transactions, Work Panels, Web Panels
Interfaces: Win, Web

Introduction

Sometimes you need to specify several NoAccept rules without any conditions, and several NoAccept rules with the same conditional expression. Now on, this can be done in a unique NoAccept rule for multiple attributes/variables.

Description

Until GeneXus 8.0, to specify a NoAccept rule for several attributes and variables you had to write down a rule for each one where the NoAccept rule applied.
If the NoAccept rules were conditional, you also had to write the condition several times. As a result, the rule space of the objects was unnecessarily filled with redundant information.
Now on, the NoAccept rule allows to specify a list of attributes or variables.

The syntax is as follows:


Noaccept( {att1|&var1}, ... , {atti|&vari} ) if cond ;

where:
atti, &vari: attributes (in Transactions) or variables (in Work and Web panels) that won't be accepted if the condition cond is satisfied.

Examples

Consider the following rules that were written as follows in previous versions:

NOACCEPT(PrdDsc); // Unconditional NOACCEPT
NOACCEPT(PrdCat);

NOACCEPT(CreditLimit) if CustomerCat = 1; // Conditional NOACCEPT
NOACCEPT(CreditBalance) if CustomerCat = 1;

The same rules can now be written in only two lines as shown below:
NOACCEPT(PrdDsc, PrdCat); // Unconditional NOACCEPT
 
NOACCEPT(CreditLimit, CreditBalance) if CustomerCat = 1; // Conditional NOACCEPT


Comments & Collaboration

Interesting links


NoAccept Rule in GeneXus 8.0 Help System

Attachment