Skip to Content

Another way to use Validation Group

Today, Business requirements are such that sometimes there is requirement to create certain complex validations which are really hard to achieve. For example, consider a requirement where the following expression is required:
IF (Account Group.Name = “0003”, Payment Terms Type.Name=”0001″)
It seems like easy validation but actually it is not as Account Group is a  field of Type Lookup [Flat] in main table whereas a Company Code Data is a field of Type Tuple(Multi-valued) which is lookup to some Tuple Table in main table and this Tuple table has one of his member field as Payment Terms Type. So here Payment Terms Type is a member field of Type Lookup [Flat] inside a Tuple table. Now the Problem is through Validation tab, if you select main table then you would not able to select field Payment Terms Type while if you select Tuple table then you would not able to select Account Group as here you would only able to see all members of Tuple table not main table fields.

So the question: Is there any solution to this?

Yes, this can be achieved using Validation Group which is really handy in such situations since we can use Validation Group across tables

Validation Group : Each validation group is a set of validations that can be conveniently executed as a group with a single selection rather than forcing you to run each individual validation separately. 

Lets see the below procedure how can we work with it.
In validations Tab, right click->Edit Validations Groups as shown in below screen-shot.



Now give a validation Group name say IF(AG=”0003″, PYT=”0001″) as shown in below screen-shot.



Now select the main table, create a validation and assign this validation group created above in Group Property as shown below.
Main table validation



Tuple Table Validation



Now in record mode of data Manager, there are three records as shown below:

Record ID                      Account Group                     Payment Terms Type (inside lookup  multi-valued Tuple field company code)
1                                                     0003                                                                0001
2                                                      ZEXT                                                                 0001
3                                                      0003                                     0002


In Record mode, Select all these three records–>Right Click–>Validations–>Execute Group–>IF(AG=”0003″, PYT=”0001″) as shown below.


So validations for which both Account Group and Payment Terms Type are true that is valid record. Thus only Record ID 1 is a valid record because we have to consider here TRUE (tick) for both validations as shown below.  



So this is one aspect of Validation Group which can be used effectively in such validation requirements.  

You must be Logged on to comment or reply to a post.
  • Hi Mandeep,

    Just want to know whether this validate all the tuple records.
    As in this case tuple is multivalued,if a maintable record contain value that satisfy validation but for tuplevalue of  maintable record  conatin two records one contain valid and one contain invalid value then in this case what happen.

    Please clarify this.
    Asper my understanding this will not validate properly and check the first tuple record only.


    • Hi Sudhanshu,

      First of all thanks for reading my blog..!!

      Yes, this will validate all the tuple records.

      For example: Record ID 1 is linked with two tuple records which has Payment Terms Type values
      as 0001 and 0006. So it contains one valid and one non-valid record, if you execute this Validation,it will fail. It will pass only if every record of Tuple contains 0001 else fails.
      For your kind information, It does not check only the first record of Tuple table, it checks for all
      the records available in your Tuple table.