{"id":10929,"date":"2017-10-30T12:35:01","date_gmt":"2017-10-30T12:35:01","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=10929"},"modified":"2017-10-30T12:35:01","modified_gmt":"2017-10-30T12:35:01","slug":"how-to-repeat-a-sub-string-using-sage-x3-keyword","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/10\/30\/how-to-repeat-a-sub-string-using-sage-x3-keyword\/","title":{"rendered":"How to repeat a sub-string using Sage X3 keyword"},"content":{"rendered":"<p>You may come across where you wanna a repeat the word n times.<\/p>\n<p>String$ is used to define a string , the result of repeating a sub- string or an ascii code.<\/p>\n<p>If the number of characters in the result is more than 255, the string returned is truncated to 255 characters without generating an error.<\/p>\n<p>If nb_char is null or if code_char is null or if sub_string is the empty string, the result returned by <strong>string$<\/strong> is the empty string.<\/p>\n<p><strong>string$<\/strong>(nb_char, sub_string)<br \/>\n<strong>string$<\/strong>(nb_char, code_char)<\/p>\n<p><strong>Parameters<\/strong><\/p>\n<table style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"20%\"><strong>Element<\/strong><\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\"><strong>Description<\/strong><\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\"><strong>\u00a0\u00a0\u00a0 Restrictions<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"20%\">nb_char<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">Integer numerical expression of the repeat factor of the characters or sub_string<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">\u00a0\u00a0\u00a0 nb_char\u00a0\u00a0 &gt;=\u00a0 0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"20%\">sub_string<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">Alphanumeric expression that will be repeated<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">\u00a0\u00a0\u00a0\u00a0 None<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"20%\">code_char<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">Integer numerical expression corresponding to the ascii code of the character to be repeated.<\/td>\n<td style=\"text-align: center;border: 1px solid #CCCCCC\" width=\"40%\">\u00a0\u00a0\u00a0\u00a0 0 &lt;= code_char &lt;=255<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Examples<\/strong><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-10933\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2017\/10\/repeat-a-sub-string-1.png\" alt=\"repeat a sub-string\" width=\"953\" height=\"231\" \/><\/p>\n<p>Hope this blog\u00a0 helps !<\/p>\n<p>&nbsp;<\/p>\n<p><strong>About Us<\/strong><\/p>\n<p><a href=\"http:\/\/www.greytrix.com\/\">Greytrix<\/a> is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.<\/p>\n<p><a href=\"http:\/\/www.greytrix.com\/\">Greytrix<\/a> have some unique solutions of Sage X3\u2019s integration with <a href=\"http:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\">Sage CRM<\/a>, <a href=\"http:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Salesforce.com <\/a>and <a href=\"http:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\">Magento<\/a> eCommerce. It also offers best-in-class <a href=\"http:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\">Sage X3 customization and development services <\/a>to Sage business partners, end users, and Sage PSG worldwide.<\/p>\n<p>For more information on Sage X3 Integration and Services, please contact us at <a href=\"mailto:x3@greytrix.com\">x3@greytrix.com<\/a> . We will be glad to assist you.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><em>Also Read:<\/em><\/strong><\/p>\n<ol>\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/05\/17\/find-number-of-variables-defined-in-a-class\/\"><strong>How to find number of Variables defined in a Class<\/strong><\/a><\/li>\n<\/ol>\n<ol start=\"2\">\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/02\/14\/how-to-find-size-used-for-the-storage-of-blob-or-clob-variable\/\"><strong>How to find size used for the storage of BLOB or CLOB variable<\/strong><\/a><\/li>\n<\/ol>\n<ol start=\"3\">\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/03\/27\/how-to-execute-workflow-through-function\/\">How to execute workflow through a function<\/a>?<\/strong><\/li>\n<\/ol>\n<ol start=\"4\">\n<li><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/02\/13\/extracts-the-nth-character-of-a-char-or-clob-variable\/\"><strong>Extracts the Nth character of a CHAR or CLOB variable<\/strong><\/a><\/li>\n<\/ol>\n<ol start=\"5\">\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/05\/11\/how-to-know-a-mask-variable-is-initialized-or-not\/\">How to know a Mask Variable is Initialized or not<\/a>?<\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>You may come across where you wanna a repeat the word n times. String$ is used to define a string , the result of repeating a sub- string or an ascii code. If the number of characters in the result is more than 255, the string returned is truncated to 255 characters without generating an\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/10\/30\/how-to-repeat-a-sub-string-using-sage-x3-keyword\/\">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":[5],"tags":[],"class_list":["post-10929","post","type-post","status-publish","format-standard","hentry","category-features"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/10929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/comments?post=10929"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/10929\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=10929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=10929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=10929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}