{"id":7700,"date":"2015-10-20T12:49:18","date_gmt":"2015-10-20T12:49:18","guid":{"rendered":"http:\/\/www.greytrix.com\/blogs\/sagex3\/?p=7700"},"modified":"2015-10-20T12:49:18","modified_gmt":"2015-10-20T12:49:18","slug":"how-to-assign-value-to-variable-at-runtime-for-which-you-do-not-know-the-name-beforehand","status":"publish","type":"post","link":"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/10\/20\/how-to-assign-value-to-variable-at-runtime-for-which-you-do-not-know-the-name-beforehand\/","title":{"rendered":"How to assign value to variable at runtime for which you do not know the name beforehand?"},"content":{"rendered":"<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\">You may come across the situation, where you want to assign value to variable at runtime for which you do not know the name beforehand.<\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\">Sage X3 has a special function to assign value to variable at runtime for which you do not know the name beforehand.<\/span><\/span><\/p>\n<p><em><strong><span style=\"color: #993300\">New Stuff:\u00a0<\/span><\/strong><\/em><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/10\/20\/entry-point-to-update-custom-fields-of-stojou-stock-journal-table\/\">Entry Point to Update Custom Fields of STOJOU (Stock journal) table<\/a><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: large\"><u><b>Assign<\/b><\/u><\/span><\/span><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: large\">: This function assigns value to the variable for which you do not know the name beforehand. <\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: large\"><u><b>Syntax<\/b><\/u><\/span><\/span><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: large\">: <\/span><\/span><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\">Assign name_exp With value_exp<\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: large\"><u><b>Parameter details: <\/b><\/u><\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\"> name_exp: Expression of the Char type which results in the name of a variable. But the variable must be exist at runtime.<\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\"> value_exp: Any expression that will be compatible for that variable at runtime.<\/span><\/span><\/p>\n<p><span style=\"font-family: 'Times New Roman', serif\"><span style=\"font-size: medium\">Kindly refer to the below snippet of code for better understanding.<\/span><\/span><\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2015\/10\/b1.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-7701\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2015\/10\/b1.jpg\" alt=\"b1\" width=\"623\" height=\"238\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2015\/10\/b2.jpg\"><img decoding=\"async\" class=\"aligncenter  wp-image-7702\" src=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-content\/uploads\/2015\/10\/b2.jpg\" alt=\"b2\" width=\"545\" height=\"195\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #993300\"><em><strong>Also read:<\/strong><\/em><\/span><\/p>\n<p>1.\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/09\/29\/how-to-differentiate-the-local-and-variable\/\">How to differentiate the Local and Variable?<\/a><br \/>\n2.\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/07\/29\/how-to-add-months-to-your-date-variable-in-sage-x3-version-7\/\">How to add months to your date variable in Sage X3 version 7<\/a><br \/>\n3.\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/11\/27\/how-to-determine-if-a-mask-variable-can-be-entered-or-is-displayed\/\">How to determine if a mask variable can be entered or is displayed..?<\/a><br \/>\n4.\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2014\/03\/19\/checking-the-type-of-variable\/\">Checking the Type of variable<\/a><br \/>\n5.\u00a0<a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2013\/01\/17\/global-variables-in-x3\/\">Global Variables in X3<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may come across the situation, where you want to assign value to variable at runtime for which you do not know the name beforehand. Sage X3 has a special function to assign value to variable at runtime for which you do not know the name beforehand. New Stuff:\u00a0Entry Point to Update Custom Fields of\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.greytrix.com\/blogs\/sagex3\/2015\/10\/20\/how-to-assign-value-to-variable-at-runtime-for-which-you-do-not-know-the-name-beforehand\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[983,984,985,986],"class_list":["post-7700","post","type-post","status-publish","format-standard","hentry","category-sage-erp-x3","tag-how-to-assign-value-to-a-variable-at-runtime","tag-how-to-assign-value-to-not-named-variable-at-runtime","tag-how-to-assign-value-to-the-unnamed-variable","tag-how-to-assign-value-to-variable-at-runtime-for-which-you-do-not-know-the-name-beforehand"],"_links":{"self":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/7700","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=7700"}],"version-history":[{"count":0,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/posts\/7700\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/media?parent=7700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/categories?post=7700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.greytrix.com\/blogs\/sagex3\/wp-json\/wp\/v2\/tags?post=7700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}