{"id":10799,"date":"2017-09-13T08:43:21","date_gmt":"2017-09-13T08:43:21","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=10799"},"modified":"2017-09-13T08:43:21","modified_gmt":"2017-09-13T08:43:21","slug":"how-to-calculate-permutation-in-sage-x3","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/09\/13\/how-to-calculate-permutation-in-sage-x3\/","title":{"rendered":"How to Calculate Permutation in Sage X3"},"content":{"rendered":"<p style=\"text-align: justify;\">Sage X3 provides a special function to calculate permutation of any integer value.<\/p>\n<p>The function <strong><em>anp()<\/em><\/strong> calculates the number of permutations (for example, ordered arrangements) of <strong>p <\/strong>objects taken from <strong>n<\/strong>.<\/p>\n<p>Syntax for the same is :<\/p>\n<p><strong><u>Syntax<\/u><\/strong><strong>:<\/strong><\/p>\n<p>anp(N,P)<\/p>\n<p>where, N and P are integer expressions. P must be in the [0,N] range.<\/p>\n<p><strong><u>Example<\/u><\/strong><strong>:<\/strong><\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2017\/09\/Calculate-Permutation.png\"><img decoding=\"async\" class=\"wp-image-10800 size-medium aligncenter\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2017\/09\/Calculate-Permutation-300x97.png\" alt=\"Calculate Permutation\" width=\"300\" height=\"97\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Fig.<\/strong> Snippet<\/p>\n<p><strong><u>Output:<\/u><\/strong><\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2017\/09\/Calculate-Permutation-1.png\"><img decoding=\"async\" class=\"size-medium wp-image-10801 aligncenter\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2017\/09\/Calculate-Permutation-1-300x107.png\" alt=\"Calculate Permutation\" width=\"300\" height=\"107\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Fig.<\/strong> Output<\/p>\n<p><strong><u>Description:<\/u><\/strong><\/p>\n<p>The function anp(N,P) returns fac(N)\/ fac(N-P).<\/p>\n<p style=\"text-align: justify;\">To avoid loosing precision, the calculation algorithm does not use the factorial function. If <strong>N <\/strong>and <strong>P <\/strong>are not integer values, they are truncated.<\/p>\n<p style=\"text-align: justify;\">The type of result is Integer or Decimal depending if the value is smaller or greater than <strong>2^31-1<\/strong>.<\/p>\n<p><strong><u>Associated errors:<\/u><\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"55\">Error<\/td>\n<td width=\"201\">Description<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">10<\/td>\n<td width=\"201\">Not a numeric argument.<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">13<\/td>\n<td width=\"201\">Out of range calculation.<\/td>\n<\/tr>\n<tr>\n<td width=\"55\">50<\/td>\n<td width=\"201\">Domain error.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Hope this helps!<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>About Us<\/strong><\/p>\n<p style=\"text-align: justify;\">Greytrix 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 style=\"text-align: justify;\"><a href=\"http:\/\/www.greytrix.com\/\">Greytrix<\/a>\u00a0have some unique solutions of\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-crm\/gumu-sage-x3-integration\">Sage X3 integration with Sage CRM<\/a>,\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/sage-x3\/gumu-x3-salesforce-integration\">Salesforce.com<\/a>\u00a0and\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/magento-sage-integrations\/sage-x3-magento\">Magento eCommerce<\/a> along with Sage X3 migration from Sage 50 US, Sage Pro and QuickBooks. \u00a0We also offer best-in-class\u00a0<a href=\"http:\/\/www.greytrix.com\/product\/erp-development\/sage-x3\">Sage X3 customization and development services<\/a>\u00a0to Sage business partners, end users, and Sage PSG worldwide.<\/p>\n<p style=\"text-align: justify;\">For more information on Sage X3 Integration and Services, please contact us at\u00a0<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<ul>\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/10\/30\/how-to-calculate-remainder-using-x3-mod-function\/\">How to calculate remainder using x3 mod function<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/02\/15\/how-to-find-the-square-root-of-the-number\/\">How to find the square root of the Number<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2016\/09\/17\/how-to-find-the-day-of-the-week\/\">How to Find the DAY of the Week<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/10\/29\/how-to-know-start-date-of-week-of-any-year\/\">How to Know Start date of Week of any Year?<\/a><\/strong><\/li>\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<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Sage X3 provides a special function to calculate permutation of any integer value. The function anp() calculates the number of permutations (for example, ordered arrangements) of p objects taken from n. Syntax for the same is : Syntax: anp(N,P) where, N and P are integer expressions. P must be in the [0,N] range. Example: Fig.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2017\/09\/13\/how-to-calculate-permutation-in-sage-x3\/\">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,8],"tags":[],"class_list":["post-10799","post","type-post","status-publish","format-standard","hentry","category-features","category-sage-erp-x3"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/10799","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=10799"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/10799\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=10799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=10799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=10799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}