.title "Semiloops in NewViews Totalto Structure" .id 314120060203201447 .tags "manual" .body { [p { Semiloops are [qw_term deprecated] meaning that if they already exist in a particular database then they continue to be allowed in that database. But semiloops are not allowed in new databases. }] [p { We strongly recommend that you remove semiloops if they exist in a database. You can check for semiloops and, if found, display them using the [qw_menu_command Tools Totalto Semiloop Search] command. }] [ul { [li {[link .chm $::qw_manual_file .id 314120070710132842 {More on semiloops.}]}] }] [/* { [h1 "Semiloops in NewViews Totalto Structure"] [ul { [li {[link .chm $::qw_manual_file .id 314120070710132842 {More on semiloops in the total-to structure.}]}] }] [ul { [li {[link .id 314120060203201447 .bookmark 314120070203125705 {Semiloops have been Deprecated}]}] [li {[link .id 314120060203201447 .bookmark 314120070203125704 {[qw_menu_command Tools Totalto Semiloop Search] Command}]}] [li {[link .id 314120060203201447 .bookmark 314120060207131828 {What is a semiloop?}]}] [li {[link .id 314120060203201447 .bookmark 314120060207131938 {What is a loop?}]}] [li {[link .id 314120060203201447 .bookmark 314120060207132059 {How bad is a semiloop?}]}] [li {[link .id 314120060203201447 .bookmark 314120060207132156 {Why were semiloops allowed in the first place?}]}] [li {[link .id 314120060203201447 .bookmark 314120070203121155 {Why are semiloops now prohibited?}]}] [/* { [li {[link .id 314120060203201447 .bookmark 314120060207104935 {Semiloop Search Window Commands}]}] */ }] }] [bookmark .id 314120070203125705 {[h2 "Semiloops have been Deprecated"]}] [p { Semiloops were allowed in NewViews up to version 2.08 but they are [qw_term deprecated] from version 2.09 on. In short, this means that if a database already has semiloops then it can continue to have them and you can even create new semiloops in such a database. But when you create a new database, semiloops are not allowed in it. Furthermore, if you eliminate all semiloops from a database, then adding new semiloops to that database will no longer be allowed. }] [bookmark .id 314120070203125704 {[h2 "[qw_menu_command Tools Totalto Semiloop Search] Command"]}] [/* { [p { The purpose of this command is to scan the set of books looking for such semiloops so that you can easily identify and eliminate them. }] */ }] [p { This command searches for semiloops in the total-to structure of a NewViews set of books. }] [p { Whenever you are positioned on a table of accounts (blue) you can issue the [qw_menu_command Tools Totalto Semiloop Search] command and a prompt like the one shown below pops up. }] [p { [img .src totalto_semiloop_search_prompt.jpg] }] [p { You can count the semiloops in a database and display them in graphic form as shown below. There are commands that display all semiloops or which stop after one or a given number of semiloops have been found. The options command enables you to control how the semiloops are displayed, i.e. colors, fonts, fields, etc. }] [p { [img .src totalto_semiloop_search_report.jpg] }] [p { Note in order to scrub a database for semiloops requires checking all accounts, and hence requires that you have been granted access to the root account. }] [p { It is also recommended that you count the semiloops first and do not attempt to display all semiloops when there are a very large number of semiloops, say more than 100. }] [/* { [h2 "Semiloop Search Limit"] [p { The semiloop search window has commands that let you search for the first semiloop, search for a maximum of N semiloops (defaulted to 5), or search for all semiloops. }] [p { The search button in the semiloop window searches for the maximum of N semiloops. You can change this maximum using the [qw_menu_command "Options" "Edit"] command in the semiloop search window menu. }] [p { When you are just checking for the existence of semiloops we recommend that you [bold "do not search for all semiloops"]. Semiloops often occur in groups of similar semiloops, often caused by exactly the same problem in the total-to structure. For example, if one inventory posting account is involved in a semiloop then chances are that all inventory accounts are involved in similar semiloops. There may be a very large number of such inventory accounts so a search for all semiloops may turn up an awkwardly large number of semiloops, all caused by the same questionable total-to. }] [p { The recommended technique is to search for the first semiloop, or the first N semiloops, identify and correct the problem, and then search again for the first or first N remaining semiloops. Eventually, if you correct problems as you go, the search will find no semiloops. }] [p { We may be giving you the impression that semiloops are common but the opposite is actually the case. Semiloops are generally rare in most sets of books encountered, or when they do exist, there are either very few, or if there are many semiloops, they are usually caused by the same small number of total-to problems. }] */ }] [bookmark .id 314120060207131828 {[h2 "What is a semiloop?"]}] [p { The graph below is a semiloop. There are two paths from [qw_field_value D] to [qw_field_value A], one through [qw_field_value B] and one through [qw_field_value C]. }] [p { [img .src totalto_semiloop_search_semiloop_example_1.gif] }] [p { A semiloop occurs whenever there is more than one path from one node to another. The graph below shows that semiloops can include many nodes. }] [p { [img .src totalto_semiloop_search_semiloop_example_2.gif] }] [p { The paths shown in red, [qw_field_value "B <- C <- E <- H"] and [qw_field_value "B <- G <- H"], form a semiloop. }] [bookmark .id 314120060207131938 {[h2 "What is a loop?"]}] [p { You might be wondering why a semiloop isn't just called a [qw_term loop]. [/* { Graphs representing the account total-to structure of a set of books have arrows. This gives them a sense of direction and for this reason such graphs are technically called [qw_term "directed graphs"] or just [qw_term digraphs] for short. */ }] But a loop in a directed graph is different from a semiloop. Whereas a semiloop has more than one path between two nodes as described above, a loop is a [qw_term cycle] where you can follow the arrows around from a node back to itself as shown below. }] [p { [img .src totalto_semiloop_search_loop_example_1.gif] }] [p { NewViews has never allowed loops in the total-to structure so there are no equivalent commands to search for loops. }] [bookmark .id 314120060207132059 {[h2 "How bad is a semiloop?"]}] [p { A semiloop in the total-to structure means that one account is totaling to another more than once. This does [qw_term not] result in duplicate postings in the account that is totalled to more than once. NewViews automatically ensures that each posting appears only once in any account. So, for example, semiloops will not typically cause a set of books to go out of balance. }] [p { What semiloops may do, however, is result in amounts that do not [qw_term appear] to add up correctly, say on a report. The graph below shows a total-to structure for a sub-section of a set of books. }] [p { [img .src totalto_semiloop_search_totaling_1.gif] }] [p { If you look at the amounts you will see that they total correctly and everything is ok. }] [p { Now, let's total KITCHENAID to FRIDGES. This is of course a questionable thing to do because KITCHENAID already totals to OVENS, but let's see what happens. The result is the semiloop shown with red arrows in the graph below: }] [p { [img .src totalto_semiloop_search_totaling_2.gif] }] [p { Look closely at the amounts. FRIDGES, shown in yellow, now has an amount of [qw_field_value 3.00] which is correct because three accounts, each with amount [qw_field_value 1.00], total to it. }] [p { But the amount for APPLIANCES, i.e. [qw_field_value 6.00], is unchanged from the previous graph. Although any posting in KITCHENAID will appear in both FRIDGES and OVENS, and although both of these accounts total to APPLIANCES, the posting will appear only once in APPLIANCES. }] [p { Furthermore, APPLIANCES, with an amount of [qw_field_value 6.00], still totals the same (correct) amount forward to the financial statements. So the semiloop does not cause statements such as the balance sheet or trial balance to go out of balance. The semiloop below APPLIANCES did not affect its amount, or the amounts of accounts that it in turn totals to. Such duplication is automatically eliminated by NewViews. }] [p { However, the problem caused by the semiloop is that the amount for APPLIANCES, i.e. [qw_field_value 6.00], does not appear to be the correct total of FRIDGES, OVENS, and TOASTERS, whose sum should be [qw_field_value 7.00] according to the total-to structure. }] [p { So a problem with semiloops is that a total account may not display an amount that [qw_term appears] to be the correct total of the accounts that total to it. Your financial statements may balance, and yet you could still have a problem that users tend to report as a [qw_term bug] in NewViews. But it isn't a bug in NewViews. It is a problem in the total-to structure of the set of books. }] [bookmark .id 314120060207132156 {[h2 "Why were semiloops allowed in the first place?"]}] [p { We have indicated that semiloops tend to be a [qw_term bad] thing so why were they ever allowed? }] [p { First, the developers of NewViews restrict operations only with reluctance and at the time, there didn't seem to be a compelling reason to prohibiting semiloops. }] [p { Second, errors reporting semiloops could be annoying when re-totaling accounts. }] [p { Third, semiloops were allowed in NewViews 1.XX and to ease conversion, NewViews 2 continued to allow semiloops. }] [bookmark .id 314120070203121155 {[h2 "Why are semiloops now prohibited?"]}] [p { Although semiloops seemed to be harmless in theory, and although this remains largely true, practical experience has often shown otherwise. Users, even experienced users, sometimes total their books into a tangled mess of spaghetti when semiloops are allowed. Exploring the total-to structure of a database using tools such as [qw_menu_command Tools Totalto Graph Above/Below] conveys very little useful information when they display this tangled mess of spaghetti. }] [p { Also compatibility with NewViews 1 (which allows semiloops) is not an issue as long as NewViews 2 is capable of allowing semiloops under these and other special circumstances. }] [p { And finally there are underlying theoretical simplications that NewViews can take advantage of, thus allowing accounts to be re-totaled much more quickly, if semiloops are prohibited. }] [/* { [bookmark .id 314120060207104935 {[h2 "Semiloop Search Window Commands"]}] [h2 [qw_menu_command "Semiloop" "Exit"]] [p { Dismisses the search window. }] [p { You can also click the [qw_button Cancel] button or the window close button. }] [h2 [qw_menu_command "Semiloop" "Find First Semiloop"]] [p { Stops searching after the first semiloop is found. }] [h2 [qw_menu_command "Semiloop" "Find First N Semiloops"]] [p { Stops searching after the first [qw_field_value N] semiloops are found. }] [p { The default search limit is [qw_field_value 5]. You can change the search limit using the [qw_menu_command "Options" "Edit"] command. }] [h2 [qw_menu_command "Semiloop" "Find All Semiloops"]] [p { Searches everything under the specified account and stops only after all semiloops have been found. }] [h2 [qw_menu_command "Options" "Edit"]] [p { Pops up the options window, allowing you to change the search limit and graph options. The graph options control the colors, fonts, text fields, and so on, of the graphs that display the semiloops. }] [h2 [qw_menu_command "Options" "Save"]] [p { This saves the current options. You can change options and apply them to the current search without saving them. If you changed the options and want to use them in subsequent searches, then should issue this command to save them. }] [p { Because options are saved only when you issue this command, you can [qw_term "play around"] with the options without any lasting effect. Save them only when you have them the way you want them. }] [p { Whenever you issue the [qw_menu_command "Tools" "Totalto" "Semiloop Search"] command from a blue table to create a new graph window, the most recently saved options are used. }] [h2 [qw_menu_command "Help" "Search"]] [p { Pops up the general help on this command. [qw_key F1] does the same thing. }] */ }] [/* { /314120060104155030 { .title "General information about totaling in NewViews." .id 314120060104155030 .tags "manual" .body { [h1 "General information about totaling in NewViews."] [p { NewViews accounts [qw_term "total to"] other accounts. A user can wire up the accounts in a set of books for a wide range ofif an extrmely flexible manner to create a wide range of accounting This is one of the reasons NewViews is so flexible and thus powerful. }] [h2 "Automatic Totaling"] [p { The NewViews account class hierarchy is automatically wired up for totaling. All children of a parent account total to that parent account. Totaling is recursive in the sense that the parent account totals to its parents, and so on. }] [p { For example, the account /ACCOUNT/AR/ADLER automatically totals to its parent account in the class hierarchy, i.e. /ACCOUNT/AR. This is also true for the other customers since they are all children of /ACCOUNT/AR in the class hierarchy. So the root customer account, i.e. /ACCOUNT/AR, is automatically the sum of all customers. When you visit the postings of /ACCOUNT/AR you will see all transactions added to all customers. }] [p { The root customer account, /ACCOUNT/AR, in turn totals to /ACCOUNT, the root account. In fact, every account in the database is ultimately derived from the root account and automatically totals to it. Therefore the root account provides the ultimate proof of the database and its balance is always zero for any period. }] [p { The NewViews account class hierarchy is automatically wired up for totaling. For example, the account /ACCOUNT/AR/ADLER automatically totals to its parent account in the class hierarchy, i.e. /ACCOUNT/AR. This is also true for the other customers since they are all children of /ACCOUNT/AR in the class hierarchy. So the root customer account, i.e. /ACCOUNT/AR, is automatically the sum of all customers. When you visit the postings of /ACCOUNT/AR you will see all transactions added to all customers. The parent account in the class hierarchy can be considered to be an automatic total to field and the result is that any account is automatically the total of all accounts derived from it. }] } } */ }] */ }] }