{"id":2975,"date":"2021-02-10T07:32:44","date_gmt":"2021-02-10T07:32:44","guid":{"rendered":"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/?p=2975"},"modified":"2024-07-01T11:34:20","modified_gmt":"2024-07-01T11:34:20","slug":"restrict-special-characters-using-sage-intacct-smart-rules","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/","title":{"rendered":"Restrict Special Characters using Sage Intacct Smart Rules"},"content":{"rendered":"\n<p>Sometimes we might face a scenario where we find the need to prevent users from entering special characters in some fields. For example we want to restrict users from using the &#8220;%, &amp;, @&#8221; characters in the Bill &#8216;Description&#8217; field.<\/p>\n\n\n\n<p>As we know we can use Smart Rules to add user based validations to the standard screens. They allow us to write run-time validations. Using Smart Rules, we can ensure that the standards of our business processes are achieved.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.greytrix.com\/product\/professional-services\/sage-intacct-development-services\" target=\"_blank\" rel=\"noreferrer noopener\">Sage<\/a><a href=\"http:\/\/www.sageintacct.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">&nbsp;Intacct<\/a> allows us to use string methods for validating string inputs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>strtolower(parameter) : To return the string in lowercase.<\/li><li>strtoupper(parameter) : To return the string in Uppercase.<\/li><li>strlen(parameter) : To return the length of string.<\/li><li>substr(parameter,start,[length]) : To return a substring whose length starts from the character at the position provided as start and goes upto the length of characters mentioned. Length is the end of string if not mentioned.<\/li><li>right(parameter,length) : To return a substring starting from the character at position provided as length, counting from end of the string.<\/li><li>left(parameter,length) : To return a substring starting from the character at position provided as length, counting from the beginning.<\/li><li>strstr(parameter,token) : To check if the substring\/token is present within the string. For checking case sensitivity as well use stristr(parameter,token).<\/li><\/ul>\n\n\n\n<p>We can use <strong>strstr(parameter, token)<\/strong> methodwithin Smart Rule condition for preventing special charactes. This method returns a Boolean value (true\/ false) based on if the&nbsp;mentioned token&nbsp;exists within the&nbsp;parameter string. Make sure to write strstr all in lowercase as the method strstr() is case-sensitive.<\/p>\n\n\n\n<p>Follow the steps below:<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>Add a new Smart Rule on the desired object (e.g: AP Bill) by navigating into Platform services.<\/li><li>Select Events Add and Edit. Choose the message type as \u201cError\u201d.<\/li><li>Write the following condition and Save.<br><br><a rel=\"noopener noreferrer\" style=\"font-size: inherit;\" href=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\" target=\"_blank\"><img decoding=\"async\" class=\"size-full\" style=\"border-width: 1px; border-style: solid; border-color: rgb(169, 169, 169); padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\" alt=\"Smart Rule\"><\/a><br><\/li><li>Now add a bill to check how our validation is working. Fill in the desired details and mention any or all of %, &amp; and @ symbols in the description field and then click Post.<br><br><a rel=\"noopener noreferrer\" style=\"font-size: inherit;\" href=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Add-Bill.png\" target=\"_blank\"><img decoding=\"async\" class=\"size-full\" style=\"border-width: 1px; border-style: solid; border-color: rgb(169, 169, 169); padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Add-Bill.png\" alt=\"Add Bill\"><\/a><br><br><a rel=\"noopener noreferrer\" style=\"font-size: inherit;\" href=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Error.png\" target=\"_blank\"><img decoding=\"async\" class=\"size-full\" style=\"border-width: 1px; border-style: solid; border-color: rgb(169, 169, 169); padding: 2px; margin: 2px;\" src=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Error.png\" alt=\"Error\"><\/a><br><span style=\"font-size: inherit;\">Above error is displayed thus restricting Users from entering %, &amp;, @ characters in Description field. All other special characters are allowed though. <\/span><\/li><\/ol>\n\n\n\n<p>This way using a Smart Rule we can easily validate the Bills to check if the Users bide by the characters we want to allow in Description field.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Sometimes we might face a scenario where we find the need to prevent users from entering special characters in some fields. For example we want to restrict users from using the &#8220;%, &amp;, @&#8221; characters in the Bill &#8216;Description&#8217; field. As we know we can use Smart Rules to add user based validations to the\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[191,127,344,34,23,208,345],"class_list":["post-2975","post","type-post","status-publish","format-standard","hentry","category-sage-intacct","tag-customization-service","tag-platform-services","tag-prevent-special-characters","tag-sage-intacct","tag-sage-intacct-customization","tag-smart-rules","tag-special-characters"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Sage Intacct Smart Rules: Limit Special Characters<\/title>\n<meta name=\"description\" content=\"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Sage Intacct Smart Rules: Limit Special Characters\" \/>\n<meta property=\"og:description\" content=\"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\" \/>\n<meta property=\"og:site_name\" content=\"Sage Intacct \u2013 Tips, Tricks and Components\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-10T07:32:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-01T11:34:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\" \/>\n<meta name=\"author\" content=\"Greytrix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greytrix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\",\"name\":\"Sage Intacct Smart Rules: Limit Special Characters\",\"isPartOf\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\",\"datePublished\":\"2021-02-10T07:32:44+00:00\",\"dateModified\":\"2024-07-01T11:34:20+00:00\",\"author\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/e108e7d0e2204e7a4b30748b516741c8\"},\"description\":\"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\",\"contentUrl\":\"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Restrict Special Characters using Sage Intacct Smart Rules\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website\",\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/\",\"name\":\"Sage Intacct \u2013 Tips, Tricks and Components\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/e108e7d0e2204e7a4b30748b516741c8\",\"name\":\"Greytrix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g\",\"caption\":\"Greytrix\"},\"url\":\"https:\/\/www.greytrix.com\/blogs\/sageintacct\/author\/sageintacct\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Sage Intacct Smart Rules: Limit Special Characters","description":"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.","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:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/","og_locale":"en_US","og_type":"article","og_title":"Sage Intacct Smart Rules: Limit Special Characters","og_description":"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.","og_url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/","og_site_name":"Sage Intacct \u2013 Tips, Tricks and Components","article_published_time":"2021-02-10T07:32:44+00:00","article_modified_time":"2024-07-01T11:34:20+00:00","og_image":[{"url":"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png","type":"","width":"","height":""}],"author":"Greytrix","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greytrix","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/","url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/","name":"Sage Intacct Smart Rules: Limit Special Characters","isPartOf":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage"},"image":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage"},"thumbnailUrl":"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png","datePublished":"2021-02-10T07:32:44+00:00","dateModified":"2024-07-01T11:34:20+00:00","author":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/e108e7d0e2204e7a4b30748b516741c8"},"description":"Find out more about how to use Sage Intacct Smart Rules to restrict special characters.","breadcrumb":{"@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#primaryimage","url":"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png","contentUrl":"https:\/\/www.greytrix.com\/blogs\/sagebusinesscloud\/wp-content\/uploads\/2021\/02\/Rule-Condition.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/2021\/02\/10\/restrict-special-characters-using-sage-intacct-smart-rules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/"},{"@type":"ListItem","position":2,"name":"Restrict Special Characters using Sage Intacct Smart Rules"}]},{"@type":"WebSite","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#website","url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/","name":"Sage Intacct \u2013 Tips, Tricks and Components","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/e108e7d0e2204e7a4b30748b516741c8","name":"Greytrix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c3b4325cb326e36467f945b9b9adf2bb85e907fe092d42eb36b39743b492e626?s=96&d=mm&r=g","caption":"Greytrix"},"url":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/author\/sageintacct\/"}]}},"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/2975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/comments?post=2975"}],"version-history":[{"count":1,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/2975\/revisions"}],"predecessor-version":[{"id":6299,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/posts\/2975\/revisions\/6299"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/media?parent=2975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/categories?post=2975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sageintacct\/wp-json\/wp\/v2\/tags?post=2975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}