{"id":32224,"date":"2022-07-25T12:57:15","date_gmt":"2022-07-25T07:27:15","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=32224"},"modified":"2022-07-25T12:57:15","modified_gmt":"2022-07-25T07:27:15","slug":"how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/","title":{"rendered":"How to generate a random number using Rand() and RandBetween() function in Canvas App"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In this blog, we will learn how we can create one random color in RGBA format by generating random numbers.<\/p>\n<p><strong>Problem:<\/strong><\/p>\n<p>We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot. In the below screen we want categories of all Accounts to be shown in color-coded format, so it is necessary to display all categories of Accounts in Unique colors. For this, we want to generate random colors for each industry and assign them to a specific category.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-32225\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg\" alt=\"Canvas App\" width=\"1365\" height=\"651\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg 1365w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App-300x143.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App-1024x488.jpeg 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App-768x366.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App-660x315.jpeg 660w\" sizes=\"(max-width: 1365px) 100vw, 1365px\" \/><\/p>\n<p><strong>Solution:<\/strong><\/p>\n<p>We can generate the random color using <strong>Rand() or RandBetween()<\/strong> function in Canvas App. Please find the below syntax for the above function.<\/p>\n<p><strong>Syntax:<\/strong><\/p>\n<p><strong>Rand() = <\/strong>This function will generate one random number greater than 0 but less than 1. <strong>For example 0.26786, 0.65784.<\/strong><\/p>\n<p><strong>RandBetween(START_RANGE, END_RANGE) = <\/strong>This function will return the whole number between the range that we provide to the function.<\/p>\n<p>Where,<\/p>\n<ol>\n<li><strong>START_RANGE<\/strong> \u2013 It is a numeric value that states the starting range of the random number which we want to generate.<\/li>\n<li><strong>END_RANGE<\/strong> &#8211; It is a numeric value that state the ending range of the random number which we want to generate.<\/li>\n<\/ol>\n<blockquote><p><strong><em>Note: After applying the above Power Fx function, one whole number will be generated between the range that we provide to the RandBetween() function.<\/em><\/strong><\/p><\/blockquote>\n<p>Please find the below Power Fx formulas that we have used to generate the random color for each category checkbox.<\/p>\n<p><strong><em>UpdateContext({red:RandBetween( 0, 99 )});<\/em><\/strong><\/p>\n<p><strong><em>UpdateContext({green:RandBetween( 0, 99 )});<\/em><\/strong><\/p>\n<p><strong><em>UpdateContext({blue:RandBetween( 0, 99 )});<\/em><\/strong><\/p>\n<p>In the above code we have generated the three random numbers for each industry and assigned a color to that category legend by using generated numbers in RGBA format as shown in the above screenshot:<\/p>\n<p><strong><em>RGBA(red,green,blue,1) <\/em><\/strong><\/p>\n<h2><strong>Conclusion:<\/strong><\/h2>\n<p>In this way, by using Rand() or RandBetween() function we can create or generate a random number to process any operation in Canvas App.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/mailchimp-dynamics-365-crm-integration-marketing-4-dynamics\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone  wp-image-32226\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/m4d.jpg\" alt=\"\" width=\"840\" height=\"210\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/m4d.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/m4d-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/m4d-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/m4d-660x165.jpg 660w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/\">Read More: How to generate a random number using Rand() and RandBetween()\u2026 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1954,18,2361],"tags":[1867],"class_list":["post-32224","post","type-post","status-publish","format-standard","hentry","category-canvas-apps","category-dynamics-365-v9-2","category-technical","tag-canvas-app"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Inogic\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1365\" \/>\n\t\t<meta property=\"og:image:height\" content=\"651\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-07-25T07:27:15+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-07-25T07:27:15+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Inogic\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#blogposting\",\"name\":\"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"How to generate a random number using Rand() and RandBetween() function in Canvas App\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/Canvas-App.jpeg\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#articleImage\",\"width\":1365,\"height\":651,\"caption\":\"Canvas App\"},\"datePublished\":\"2022-07-25T12:57:15+05:30\",\"dateModified\":\"2022-07-25T12:57:15+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#webpage\"},\"articleSection\":\"Canvas Apps, Dynamics 365 v9, Technical, Canvas App\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365-v9-2\\\/#listItem\",\"name\":\"Dynamics 365 v9\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365-v9-2\\\/#listItem\",\"position\":2,\"name\":\"Dynamics 365 v9\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365-v9-2\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#listItem\",\"name\":\"How to generate a random number using Rand() and RandBetween() function in Canvas App\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#listItem\",\"position\":3,\"name\":\"How to generate a random number using Rand() and RandBetween() function in Canvas App\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-365-v9-2\\\/#listItem\",\"name\":\"Dynamics 365 v9\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Inogic\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Inogic\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/\",\"name\":\"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/07\\\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"datePublished\":\"2022-07-25T12:57:15+05:30\",\"dateModified\":\"2022-07-25T12:57:15+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.","canonical_url":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#blogposting","name":"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"How to generate a random number using Rand() and RandBetween() function in Canvas App","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#articleImage","width":1365,"height":651,"caption":"Canvas App"},"datePublished":"2022-07-25T12:57:15+05:30","dateModified":"2022-07-25T12:57:15+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#webpage"},"articleSection":"Canvas Apps, Dynamics 365 v9, Technical, Canvas App"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/#listItem","name":"Dynamics 365 v9"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/#listItem","position":2,"name":"Dynamics 365 v9","item":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#listItem","name":"How to generate a random number using Rand() and RandBetween() function in Canvas App"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#listItem","position":3,"name":"How to generate a random number using Rand() and RandBetween() function in Canvas App","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/#listItem","name":"Dynamics 365 v9"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Inogic","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Inogic"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/","name":"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"datePublished":"2022-07-25T12:57:15+05:30","dateModified":"2022-07-25T12:57:15+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.","og:url":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/","og:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg","og:image:secure_url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg","og:image:width":1365,"og:image:height":651,"article:published_time":"2022-07-25T07:27:15+00:00","article:modified_time":"2022-07-25T07:27:15+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"How to generate a random number using Rand() and RandBetween() function in Canvas App - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"Introduction In this blog, we will learn how we can create one random color in RGBA format by generating random numbers. Problem: We have a Canvas App, where we have created one Display Form. Here, we have displayed the list of categories of All Accounts in the color-coded format as shown in the below screenshot.","twitter:creator":"@inogic","twitter:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/07\/Canvas-App.jpeg","twitter:label1":"Written by","twitter:data1":"Inogic","twitter:label2":"Est. reading time","twitter:data2":"2 minutes"},"aioseo_meta_data":{"post_id":"32224","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 07:06:26","updated":"2025-07-04 09:27:43","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/\" title=\"Dynamics 365 v9\">Dynamics 365 v9<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to generate a random number using Rand() and RandBetween() function in Canvas App\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Dynamics 365 v9","link":"https:\/\/www.inogic.com\/blog\/category\/dynamics-365-v9-2\/"},{"label":"How to generate a random number using Rand() and RandBetween() function in Canvas App","link":"https:\/\/www.inogic.com\/blog\/2022\/07\/how-to-generate-a-random-number-using-rand-and-randbetween-function-in-canvas-app\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/32224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=32224"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/32224\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=32224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=32224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=32224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}