{"id":22265,"date":"2024-02-15T14:48:40","date_gmt":"2024-02-15T22:48:40","guid":{"rendered":"https:\/\/docs.extraview.com\/v22\/book\/rules-accordion-folds\/"},"modified":"2024-02-15T16:32:14","modified_gmt":"2024-02-16T00:32:14","slug":"rules-accordion-folds","status":"publish","type":"page","link":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/","title":{"rendered":"Rules &#038; Accordion Folds"},"content":{"rendered":"<p>Accordion folds are described on the page <a href=\"\/adding-accordion-folds-layouts\/\">Adding Accordion Folds to Layouts<\/a>. You may use rules to set the initial state of an accordion fold to be open or closed, and you may open or close folds using rules to determine the state of the fold..<\/p>\n<h3>\n\tExamples<\/h3>\n<ul>\n<li>\n\t\tYou have created two folds within the data dictionary, named&nbsp;Fold A and Fold B.&nbsp; This implies the fields named <code>FOLD_PRE_A<\/code>, <code>FOLD_POST_A<\/code>, <code>FOLD_PRE_B<\/code> and <code>FOLD_POST_B<\/code> all exist<\/li>\n<li>\n\t\tYou have placed these fields onto an <em>add<\/em>, <em>edit <\/em>or embedded layout<\/li>\n<li>\n\t\tThe default behavior is that&nbsp;both folds are initialized in a closed state<\/li>\n<li>\n\t\tThe first example shows how you might use a load directive to open Fold A when the screen is first presented to the user<\/p>\n<p>\t\t<code>&lt;== load ==&gt;<br \/>\n\t\tFOLD_PRE_A = {open};<\/code><br \/>\n\t\t&nbsp;<\/li>\n<li>\n\t\tAt the point where the user has opened Fold A and has performed data entry within there, we want Fold B to open when they click on the fold,&nbsp;and we want Fold A to close<\/p>\n<p>\t\t<code>&lt;== onchange ==&gt;<br \/>\n\t\tif (FOLD_PRE_B.{changed to:{open}}) {<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_A = {closed};<br \/>\n\t\t}<\/code><br \/>\n\t\t&nbsp;<\/li>\n<li>\n\t\tWhenever we click on Fold B, and no matter its state, we open another fold<\/p>\n<p>\t\t<code><font face=\"Courier New\">&lt;== onchange ==&gt;<\/font><\/code><br \/>\n\t\t<code>if (FOLD_PRE_B.{changed}) {<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_A = {open};<br \/>\n\t\t}<\/code><br \/>\n\t\t&nbsp;<\/li>\n<li>\n\t\tIn this case, we have a more complex <code>if<\/code> statement, and we both open and close other folds when we open Fold B.&nbsp; This example also presumes the existence of <font face=\"Courier New\">FOLD_PRE_C<\/font> and <code>FOLD_POST_C<\/code><\/p>\n<p>\t\t<code><font face=\"Courier New\">&lt;== onchange ==&gt;<\/font><\/code><br \/>\n\t\t<code>if (FOLD_PRE_B.{changed to:{open}} &amp;&amp; STATUS = 'Fixed') {<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_A = {closed};<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_C = {open};<br \/>\n\t\t}<\/code><br \/>\n\t\t&nbsp;<\/li>\n<li>\n\t\tThis last example shows how you might preset a number of folds, based upon the value of another field being changed by the user<\/p>\n<p>\t\t<code><font face=\"Courier New\">&lt;== onchange ==&gt;<\/font><\/code><br \/>\n\t\t<code>if (STATUS.{changed}) {<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_A = {open};<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_B = {open};<br \/>\n\t\t&nbsp;&nbsp;&nbsp; FOLD_PRE_C = {closed};<br \/>\n\t\t}<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Accordion folds are described on the page Adding Accordion Folds to Layouts. You may use rules to set the initial state of an accordion fold to be open or closed, and you may open or close folds using rules to determine the state of the fold.. Examples You have created two folds within the data&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"class_list":["post-22265","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Rules &amp; Accordion Folds - Product Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Rules &amp; Accordion Folds - Product Documentation\" \/>\n<meta property=\"og:description\" content=\"Accordion folds are described on the page Adding Accordion Folds to Layouts. You may use rules to set the initial state of an accordion fold to be open or closed, and you may open or close folds using rules to determine the state of the fold.. Examples You have created two folds within the data...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/\" \/>\n<meta property=\"og:site_name\" content=\"Product Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-16T00:32:14+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/\",\"url\":\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/\",\"name\":\"Rules & Accordion Folds - Product Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/docs.extraview.com\/v22\/#website\"},\"datePublished\":\"2024-02-15T22:48:40+00:00\",\"dateModified\":\"2024-02-16T00:32:14+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/docs.extraview.com\/v22\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Rules &#038; Accordion Folds\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/docs.extraview.com\/v22\/#website\",\"url\":\"https:\/\/docs.extraview.com\/v22\/\",\"name\":\"ExtraView Product Documentation\",\"description\":\"ExtraView Documentation\",\"publisher\":{\"@id\":\"https:\/\/docs.extraview.com\/v22\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/docs.extraview.com\/v22\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/docs.extraview.com\/v22\/#organization\",\"name\":\"ExtraView Corporation\",\"url\":\"https:\/\/docs.extraview.com\/v22\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/docs.extraview.com\/v22\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png\",\"contentUrl\":\"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png\",\"width\":512,\"height\":512,\"caption\":\"ExtraView Corporation\"},\"image\":{\"@id\":\"https:\/\/docs.extraview.com\/v22\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Rules & Accordion Folds - Product Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/","og_locale":"en_US","og_type":"article","og_title":"Rules & Accordion Folds - Product Documentation","og_description":"Accordion folds are described on the page Adding Accordion Folds to Layouts. You may use rules to set the initial state of an accordion fold to be open or closed, and you may open or close folds using rules to determine the state of the fold.. Examples You have created two folds within the data...","og_url":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/","og_site_name":"Product Documentation","article_modified_time":"2024-02-16T00:32:14+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/","url":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/","name":"Rules & Accordion Folds - Product Documentation","isPartOf":{"@id":"https:\/\/docs.extraview.com\/v22\/#website"},"datePublished":"2024-02-15T22:48:40+00:00","dateModified":"2024-02-16T00:32:14+00:00","breadcrumb":{"@id":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/docs.extraview.com\/v22\/rules-accordion-folds\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/docs.extraview.com\/v22\/"},{"@type":"ListItem","position":2,"name":"Rules &#038; Accordion Folds"}]},{"@type":"WebSite","@id":"https:\/\/docs.extraview.com\/v22\/#website","url":"https:\/\/docs.extraview.com\/v22\/","name":"ExtraView Product Documentation","description":"ExtraView Documentation","publisher":{"@id":"https:\/\/docs.extraview.com\/v22\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/docs.extraview.com\/v22\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/docs.extraview.com\/v22\/#organization","name":"ExtraView Corporation","url":"https:\/\/docs.extraview.com\/v22\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/docs.extraview.com\/v22\/#\/schema\/logo\/image\/","url":"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/docs-stg.extraview.com\/wp-content\/uploads\/2024\/03\/favicon.png","width":512,"height":512,"caption":"ExtraView Corporation"},"image":{"@id":"https:\/\/docs.extraview.com\/v22\/#\/schema\/logo\/image\/"}}]}},"taxonomy_info":[],"featured_image_src_large":false,"author_info":{"display_name":"carl.koppel","author_link":"https:\/\/docs.extraview.com\/v22\/author\/carl-koppel\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/pages\/22265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/comments?post=22265"}],"version-history":[{"count":0,"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/pages\/22265\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.extraview.com\/v22\/wp-json\/wp\/v2\/media?parent=22265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}