Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

GetUrlKeyValue from Source

Jump to solution

I have a javascript below in a standard SP 2013 OOTB Document Library NewForm.aspx that pulls ID from the source section of a URL and works great as i:

<script src=" "></script>

<script type="text/javascript">


    var theValue = GetUrlKeyValue("ID",false,unescape(GetUrlKeyValue("Source")));

    document.getElementById("Project_x0020_ID_83d3d8e5-1352-4fba-bd8b-86bddaf97847_$NumberField").value = theValue;




I am looking to get this same/similar script working in a Nintex Form.  So to be clear, the ID that I am looking for is in the &Source= section of the URL and is encoded so I can't use the GetQueryString function.  I tried this script below and on the Single Line Textbox Control settings set "Stored Client ID in JavaScript variable to "Yes" and set the Client ID JavaScript variable name to PIDValue but this did not work:

$(document).ready(function() {
var PIDValue=GetUrlKeyValue("ID",false,unescape(GetUrlKeyValue("Source")));
Labels: (1)
Tags (1)
0 Kudos
1 Reply
Nintex Newbie

Re: GetUrlKeyValue from Source

Jump to solution

I could not get the formula to work to grab from the &Source part of the URL so I went with the path of least resistance and instead added the variable I needed to the URL using instructions as provided here:

and then in turn I was able to use the GetQueryString function



View solution in original post

0 Kudos