Skip to main content
Nintex Community Menu Bar

When an item is submitted, the workflow creates a link to a new item with the following tag in the URL, &origID=ItemProperty ID and it adds this to a column.  Someone can open the original item, click on the link and it will open a new form with the original ID in the url.  This is then added to a field on the form using javascript and this is used as my "Change Request". 

 

With that said, here is my question.... How do i use javascript to take this ID and then populate the remaining fields on the form with the original item's fields?  I have been reading/testing for hours and i cannot figure out how to query the list, filter by ID, and then set the various fields to variables.  Once i have the fields set to variables, i know how to set these to the fields in my current item.... I just can't figure out how to get the fields from the query. 

 

Thank in advance.... Let me know if you want further clarification.

@sPrice971 I don't quite follow what you mean by click on a link and create a change request, but I assume you are allowing them to do edits to the form.



 



You can use javascript to capture data from the query string url, and then set the value of a field based on that, but without knowing what you are really trying to do is kinda difficult to suggest a best route.


Let me explain in more detail.

 

List A is used for users to submit a request to work or pto.  Once the manager approves this, an item is created on List B (calendar).  When this is created in List B, there is a hyperlink column titled Change Request that has a link to List A's form, with the query string of the original ID.  If someone clicks this link, i want it to populate all of the fields that were originally submitted.  I have read that i can do this using Javascript in Form Settings>Custom Javascript and that i need to query the list and filter it.  I have that part down but i don't know how to set the fields to Javascript variables.  


Hi sPrice971, 

To se the fields to JavaScript variable IDs (essentially #ID's), you would open the settings of each control you need to bind, and then click on Advanced > Store Client ID in JavaScript variable (set to yes) > enter ID name.

 

Thank you,

Sean Fiene


@sean_fiene I know the javascript variale IDs are in the control's settings and this is how to use the fields in javascript.  I am asking how to use Javascript to query a completely seperate list.  Then filter that query and set the various fields from that query to variables.

Thanks!


Reply