<script custom-tag="" type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"How to reference form variables in a HTTP POST message","image":"http://support.servicenow.com/29f1d2661baf6010cafa53d8624bcb43.iix","author":{"name":"ServiceNow Support","url":"http://support.servicenow.com/now"},"keywords":"ServiceNow, NowSupport public Knowledge Base articles, Support and Troubleshooting,KB0549832,","wordcount":"399","publisher":"ServiceNow","url":"https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0549832","datePublished":"2015-06-12","dateCreated":"2015-05-28","dateModified":"2024-04-07","description":"<h2>How to reference form variables in a HTTP POST message</h2><br/><div style=\"overflow-x:auto\"><article><div ><h3 >Description</h3><section><style type=\"text/css\"><!--\r\ndiv.margin{\r\n padding: 10p","articleBody":"<h2>How to reference form variables in a HTTP POST message</h2><br/><div style=\"overflow-x:auto\"><article><div ><h3 >Description</h3><section><style type=\"text/css\"><!--\r\ndiv.margin{\r\n padding: 10px 40px 40px 30px;\r\n}\r\n\r\ntable.tocTable{\r\n border: 1px solid;\r\n border-color:#E0E0E0;\r\n background-color: rgb(245, 245, 245);\r\n padding-top: .6em;\r\n padding-bottom: .6em;\r\n padding-left: .9em;\r\n padding-right: .6em;\r\n}\r\n\r\ntable.noteTable{\r\n border:1px solid;\r\n border-color:#E0E0E0;\r\n background-color: rgb(245, 245, 245);\r\n width: 100%;\r\n border-spacing:2;\r\n}\r\n\r\ntable.internalTable{\r\n border:1px solid;\r\n border-color:#E0E0E0;\r\n background-color: rgb(245, 245, 245);\r\n width: 100%;\r\n border-spacing:0;\r\n}\r\n\r\n.sp td{\r\n border-bottom: 1px solid;\r\n border-right: 1px solid;\r\n border-color:#E0E0E0;\r\n background-color: #ffffff;\r\n height: 20px;\r\n padding-top: .5em;\r\n padding-bottom: .5em;\r\n padding-left: .5em;\r\n padding-right: .5em;\r\n}\r\n\r\n.sphr td{\r\n border-right: 1px solid;\r\n border-bottom: 1px solid;\r\n border-color:#E0E0E0;\r\n background-color: rgb(245, 245, 245);\r\n padding-top: .5em;\r\n padding-bottom: .5em;\r\n padding-left: .5em;\r\n padding-right: .5em;\r\n height: 20px;\r\n}\r\n\r\n.title {\r\n color: #D1232B;\r\n font-weight:;\r\n font-size:25px;\r\n}\r\n\r\n.hd1{\r\n color: #D1232B;\r\n font-weight:;\r\n font-size:18px;\r\n}\r\n\r\n.hd2{\r\n color: #646464;\r\n font-weight:bold;\r\n font-size:16px;\r\n}\r\n\r\n.hd3{\r\n color: #7a7a7a;\r\n font-weight:;\r\n font-size:16 px;\r\n text-decoration:;\r\n}\r\n\r\n.hd4{\r\n color: #000000;\r\n font-weight:bold;\r\n font-size:14 px;\r\n text-decoration:;\r\n}\r\n--></style>\r\n<div class=\"margin\">\r\n<p class=\"title\"><span class=\"title\">How to reference form variables in a HTTP POST message </span></p>\r\n<p class=\"title\"><br /></p>\r\n<span class=\"hd1\">Problem</span><hr style=\"border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc;\" />The article addresses what function should be used to obtain values sent from a third-party integration that sends information through a HTTP POST request.<br />\r\n<p><br /></p>\r\n<br /><span class=\"hd1\">Resolution</span><hr style=\"border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc;\" />\r\n<p>Within the ServiceNow UI page, use <span style=\"font-family: courier new,courier;\">RP.getParameterValue('<post_variable>')</span>.</p>\r\n<p><br /></p>\r\n<p>For example, the UI page would contain:</p>\r\n<p><span style=\"font-family: courier new,courier;\"><?xml version="1.0" encoding="utf-8" ?></span></p>\r\n<p><span style=\"font-family: courier new,courier;\"><j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"></span><br /><br /><span style=\"font-family: courier new,courier;\"><g:evaluate></span></p>\r\n<p><span style=\"font-family: courier new,courier;\">var _var1 = RP.getParameterValue("variable1"); //variable1 is one of the variables in the POST request to the instance</span></p>\r\n<p><span style=\"font-family: courier new,courier;\">gs.log(_var1);</span></p>\r\n<p><span style=\"font-family: courier new,courier;\"></g:evaluate></span></p>\r\n<p><span style=\"font-family: courier new,courier;\"></j:jelly></span></p>\r\n</div></section></div></article></div>"}</script>