cancel
Showing results for 
Search instead for 
Did you mean: 
akap
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="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js "></script>

<script type="text/javascript">

setTimeout(function(){

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

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

},1000);

</script>

 

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")));
NWF$(‘#’+ProjectID).val(PIDValue);
});
Labels: (1)
Tags (1)
0 Kudos
Reply
1 Reply
akap
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: https://community.nintex.com/t5/Nintex-for-SharePoint/Add-variable-to-URL-on-Nintex-Form/td-p/64186

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

 

 

View solution in original post

0 Kudos
Reply