Skip to main content

Hello,

I am trying to reference a calculated value on my form (Client ID JS variable name = calcID) and set that value equal to varID in the javascript code in order to concat a URL based on the ID. Could someone help? When I hard code in an ID, it works, but I need it to be dynamic. 

 

9794iACD651675D276AC8.png

Thanks!

Your url property for the ajax object looks incorrectly set to the value of:



{url: _siteUrl + "/_api/web/lists/getbytitle('" + listname + "')/items(id)"}

 



which does NOT concat the id variable to the string as it's within the ending Double Quote.



 



It should likely be: 



{url: _siteUrl + "/_api/web/lists/getbytitle('" + listname + "')/items(" + id +")"}

 



Does this help?


Reply