Optimizing Cross-validation Rules in General Ledger


Cross-validation rules determine which segment values in your chart of accounts (or other key flexfields) can be used together.  Upon data entry, the rule determines and controls the valid values that may be used in conjunction with other values. This paper shows how to set up Cross-validation rules, discusses the design considerations for your chart of accounts so that you can reduce the number and complexity of your Cross-validation rules, and concludes with a list of the top seven things to remember when designing Cross-validation rules.

Setting up Cross-validation Rules

A Cross-validation rule applies only to a single chart of accounts structure or accounting flexfield.  If you have more than one accounting flexfield, you will need to define Cross-validation rules for each COA structure name (even if different charts of accounts use the same value sets). Cross-validation rules only work on data entry and for the first time a combination is used. If a user tries to create a new combination that violates a new rule, they will get an error message and the combination will not be accepted. Cross-validation rules have no impact on code combinations that are already in use, so it is important to design and set up your Cross-validation rules before you enter transactions.

You set up Cross-validation rules by describing valid combinations. In the Define Cross-Validation Rules form, you will define rule elements that specify low and high values for each segment.  Ideally, those low and high values are a range of individual values for each segment.  You define each rule element as either an Include or Exclude type. Include contains all the values in the specified range, and Exclude eliminates values that are not valid combinations. With Include ranges you list valid combinations, while Exclude ranges list invalid combinations.


Example Cross-validation Rules

Let’s assume that your chart of accounts contains the following 5 segments:


Example 1

Let’s assume that you want to prevent revenue account values (between 30000 and 40000) from being used with the balance sheet department values (between 1000 and 1999). To do this, let’s create a rule called Revenue Accounts –Balance Sheet Departments.

The Error Message is what your users will see when they try to enter an incorrect combination, and the Error Segment is where the cursor returns in the event of an error. In this case, let’s make the error message, “CV – Revenue accounts may not be used with a balance sheet department.” When determining where the cursor will return if the rule fails, identify the segment most likely to be in error. In this case, let’s assume that the department value is where you expect that most of the errors will occur. Department will be the error segment.

Next, you need to define the Cross-validation Rule Elements.

The first rule should always be an Include statement that includes the entire range of values for each segment.


Then you will create Exclude rule statements or elements that limit the values that can be used.  In this case, only one exclude statement is necessary. The following rule element prevents accounts 30000 to 40000 from being used with departments 1000-1999.


Example 2

Next, let’s create a rule that says only department 7640 can be used with any product line that starts with S.   Again, the rule starts with an Include statement that includes the entire range of values for each segment.


You will need to exclude the ranges above and below the department value, and the ranges above and below the product line value. It will be 4 rule elements in total. The following exclude statement prevents the departments below 7640 from using any product line that starts with anything below S.


The following exclude statement prevents the departments above 7640 from using any product line that starts with anything below S.


The following exclude statement prevents the departments below 7640 from using any product line that starts with anything above S.


The following exclude statement prevents the departments above 7640 from using any product line that starts with anything above S.


This cross-validation rule has 5 lines. The first line includes all possible values, and the next 4 exclude lines prevent the departments above or below 7640 from being used with any product line above or below those values starting with S.

A Good Chart of Accounts Design Helps in Optimizing Cross Validation Rules

Let’s now look at that same chart of accounts to see what would happen if the COA design did not follow the practices of good design. Click here to view a master class on best practices of chart of accounts design.

Out of Range Example 3

First, let’s see what would happen in Example 1 above if the values for the departments were not in a range.  Let’s say instead that you want to prevent revenue account values (between 30000 and 40000) from being used with any department values other than these 5 values: 3001, 5057, 6124, 8537, and 9905. Now, my rule elements are much more complex because I cannot use a range for the department values.

I still start with my include statement.


The next step is to create Exclude rules for all the values above and below each of the department values. This statement prevents all departments below 3001 from being used.


This statement prevents all departments greater than 3001 and less than 5057 from being used.


This statement prevents all departments greater than 5057 and less than 6124 from being used.


This statement prevents all departments greater than 6125 and less than 8537 from being used.


This statement prevents all departments greater than 8537 and less than 9905 from being used.


This statement prevents all departments greater than 9906 from being used.


I have very quickly gone to 6 lines and a lot more complexity. Imagine if the rule were to restrict more values, or if neither of the two segments that I am trying to control were in ranges. (In the above example, my accounts are still in a range.)

Similar Data in Multiple Segments – Example 4

In the above chart of accounts, I need to restrict Department 7640 and Account 50013, and Product Line S10 only to Company 010, Account 50013 only to Department 7640, and Product Line S10 only to Department 7640.

It is much too complex to try to exclude more than two segments in a cross validation rule, so I end up with 11 rule elements.


Exclude Rules:
CV – Department 7640 may only be used with Company 010.


Exclude Rules:
CV – Account 50013 may only be used with Company 010.


Exclude Rules:
CV – Product Line S10 may only be used with Company 010.


Exclude Rules:
CV – Account 50013 may only be used with Department 7640.


Exclude Rules:
CV – Product Line S10 may only be used with Department 7640

As these very simple examples show, it is very easy to quickly get to thousands of cross validation rules to maintain. Notice also, that it was much more difficult to determine the ranges for alphanumeric data. If your chart of accounts follows the basic principles of good design of keeping values in ranges in each segment, keeping only one kind of data in a single segment, and putting similar data only in one segment, you will be able to simplify your cross validation rules and significantly reduce maintenance of the rule elements as your business changes.

7 Criteria for Designing Good Cross-validation Rules

  1. Design your chart of accounts with cross-validation rules in mind (keep values in ranges, put similar data in only one segment, and keep each segment for only one type of data, use alphanumerics only when necessary).
  2. Start each rule with an include statement that includes the entire range of values.
  3. Limit each rule to only 2 segments.
  4. Make your error messages very descriptive so that when a user gets an error, he or she understands what changes need to be made to the entered code combination.
  5. Use several simple rules rather than one complex rule.
  6. Start your Cross-validation Error Messages with CV so that the user knows that the combination is failing because of a Cross-validation rule (as opposed to a security rule, or an end-dated value) when they get the error message.
  7. Use a single chart of accounts for all your operations. This greatly reduces the number of cross-validation rules necessary.

1,034 thoughts on “Optimizing Cross-validation Rules in General Ledger

  1. Peterdex says:

    Achat mГ©dicament en ligne fiable [url=https://pharmafst.com/#]pharmacie en ligne[/url] Pharmacie Internationale en ligne pharmafst.shop

  2. Peterdex says:

    acheter mГ©dicament en ligne sans ordonnance [url=https://pharmafst.com/#]Livraison rapide[/url] Pharmacie en ligne livraison Europe pharmafst.shop

  3. Peterdex says:

    pharmacie en ligne livraison europe [url=http://pharmafst.com/#]pharmacie en ligne pas cher[/url] pharmacies en ligne certifiГ©es pharmafst.shop

  4. Peterdex says:

    Tadalafil 20 mg prix sans ordonnance [url=https://tadalmed.shop/#]Tadalafil 20 mg prix en pharmacie[/url] cialis sans ordonnance tadalmed.com

  5. ArthurJab says:

    Актуальные юридические новости https://t.me/Urist_98RUS полезные статьи, практичные лайфхаки и советы для бизнеса и жизни. Понимайте законы легко, следите за изменениями, узнавайте секреты защиты своих прав и возможностей.

  6. LeroyLom says:

    Топ магазинов техники reyting-magazinov-tehniki.ru по качеству, ценам и сервису! Сравниваем для вас популярные площадки, ищем выгодные предложения, делимся реальными отзывами. Экономьте время и деньги — изучайте наш рейтинг и выбирайте лучшее!

  7. Peterdex says:

    Kamagra Oral Jelly pas cher [url=https://kamagraprix.shop/#]achat kamagra[/url] kamagra pas cher

  8. Lloydhed says:

    The best porn chat ai with AI is a place for private communication without restrictions. Choose scenarios, create stories and enjoy the attention of a smart interlocutor. Discover new emotions, explore fantasies and relax your soul in a safe atmosphere.

  9. Jamesjuind says:

    Кактус Казино кактус казино официальный сайт мир азарта и развлечений! Тысячи слотов, карточные игры, рулетка и захватывающие турниры. Быстрые выплаты, щедрые бонусы и поддержка 24/7. Играйте ярко, выигрывайте легко — всё это в Кактус Казино!

  10. tevas-film-tv says:

    Любите кино и сериалы? https://tevas-film-tv.ru у нас собраны лучшие подборки — от блокбастеров до авторских лент. Смотрите онлайн без ограничений, выбирайте жанры по настроению и открывайте новые истории каждый день. Кино, которое всегда с вами!

  11. SamuelRof says:

    Лучшие жизненные афоризмы, успехе и вдохновении. Короткие мысли великих людей, мудрые фразы и слова, которые заставляют задуматься. Найдите мотивацию, настрой и силу в правильных словах каждый день!

  12. kvartira-chernogoriya says:

    Хотите жить у моря? http://www.kvartira-v-chernogorii-kupit.com — квартиры, дома, виллы на лучших курортах. Удобные условия покупки, помощь на всех этапах, инвестиционные проекты. Откройте новые возможности жизни и отдыха на берегу Адриатики!

  13. Peterdex says:

    pharmacie en ligne pas cher [url=http://pharmafst.com/#]pharmacie en ligne[/url] п»їpharmacie en ligne france pharmafst.shop

  14. Peterdex says:

    Acheter Kamagra site fiable [url=http://kamagraprix.com/#]Achetez vos kamagra medicaments[/url] achat kamagra

  15. Peterdex says:

    Kamagra pharmacie en ligne [url=https://kamagraprix.com/#]Acheter Kamagra site fiable[/url] Achetez vos kamagra medicaments

  16. DavidLal says:

    супер маркетплейс кракен ссылка онион с современным интерфейсом и удобным функционалом онион, специализируется на продаже запрещенных веществ по всему миру. У нас ты найдешь всё, от ароматных шишек до белоснежного порошка. Кракен. Купить.

  17. MichaelFuB says:

    medicine courier from India to USA [url=http://medicinefromindia.com/#]medicine courier from India to USA[/url] pharmacy website india

  18. Eugeneshuri says:

    Надежный обмен валюты https://valutapiter.ru в Санкт-Петербурге! Актуальные курсы, наличные и безналичные операции, комфортные условия для частных лиц и бизнеса. Гарантия конфиденциальности и высокий уровень обслуживания.

  19. AnthonyCog says:

    Займы под материнский капитал https://юсфц.рф решение для покупки жилья или строительства дома. Быстрое оформление, прозрачные условия, минимальный пакет документов. Используйте государственную поддержку для улучшения жилищных условий уже сегодня!

  20. MichaelFuB says:

    Medicine From India [url=https://medicinefromindia.com/#]indian pharmacy online[/url] MedicineFromIndia

  21. Donniepib says:

    Кредитный потребительский кооператив https://юк-кпк.рф доступные займы и выгодные накопления для своих. Прозрачные условия, поддержка членов кооператива, защита средств. Участвуйте в финансовом объединении, где важны ваши интересы!

  22. MichaelFuB says:

    canadian drugs online [url=https://expressrxcanada.shop/#]Express Rx Canada[/url] canadian pharmacy drugs online

  23. MichaelFuB says:

    ed meds online canada [url=https://expressrxcanada.com/#]Generic drugs from Canada[/url] canadian pharmacy antibiotics

  24. MichaelFuB says:

    legit canadian pharmacy [url=http://expressrxcanada.com/#]Express Rx Canada[/url] canadian drug pharmacy

  25. MichaelFuB says:

    MedicineFromIndia [url=https://medicinefromindia.com/#]indian pharmacy online shopping[/url] Medicine From India

  26. MichaelFuB says:

    buy prescription drugs from canada cheap [url=http://expressrxcanada.com/#]ExpressRxCanada[/url] reliable canadian pharmacy

  27. MichaelFuB says:

    buy prescription drugs from canada cheap [url=https://expressrxcanada.shop/#]Generic drugs from Canada[/url] 77 canadian pharmacy

Leave a Reply

Your email address will not be published. Required fields are marked *