Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to use SharePoint Online Context in Nintex Form

How can we use SharePoint Online context in a Nintex Form?

  • _spPageContextInfo.userId
  • _spPageContextInfo.webAbsoluteUrl
  • etc ...


This code not working and return a undefined for _spPageContextInfo, so what Nintex Form use to commit form fields to sharepoint list and keep users informations alive in the nintex form?


var pollSP;
NWF.FormFiller.Events.RegisterAfterReady(function () { console.log("*** NintexForms.js RegisterAfterReady: " + BusinessUnitClientID); pollSP = setInterval(checkSPLoad, 500); try { if (ExpirationDateClientID != "") { SetDefaultExpirationDate(); AttachEventOnChangeInput("input[id='" + ExpirationDateClientID + "']", "SetDefaultExpirationDate();"); if (CollaborationTypeClientID != "") { AttachEventOnChangeInput("select[id='" + CollaborationTypeClientID + "']", "SetDefaultExpirationDate();"); } } } catch (err) { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); console.log(err); console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } }); function checkSPLoad() { if (clientContext) { window.clearInterval(pollSP); onSPLoad(); } } function onSPLoad() { try { console.log("*** onSPLoad called "); var userId = _spPageContextInfo.userId; console.log("*** onSPLoad Current User = " + userId); } catch (err) { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); console.log(err); console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); } }

To all technicals nintex evangelists, If it's not possible, doe not hesitate and please confirm it to me, so i can stop losing my times with nintex form and do it easiest with an SPFx components.




Labels: (2)
0 Kudos
2 Replies
Community Manager Community Manager
Community Manager

Re: How to use SharePoint Online Context in Nintex Form

@maxime_ouellet, Can you share what you are trying to do with SharePoint Online Context?


Wihtin Nintex forms you can use calculated value controls and labels to show information from the context of the form such as initiator, current date, time, etc. You can also pull information from the User Profile as well. 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to use SharePoint Online Context in Nintex Form

As @eharris04 mentioned, the userprofile function can pull data back from the user profile service for the logged in user. This example below is pulling back the preferred language property as an example.



0 Kudos
Accept as Solution Reply