Skip to main content
Nintex Community Menu Bar

Can you access the \common\" variables such as {Common:CurrentUserDisplayName} from JavaScript?"

  • May 5, 2017
  • 4 replies
  • 14 views

Forum|alt.badge.img+4

Can you get at the values stored in the Common values in Nintex forms (for Office 365) from JavaScript?

For instance, how could I get at the value in {Common:CurrentUserDisplayName} from JavaScript code running in the form?

Chris

4 replies

Forum|alt.badge.img+7

Hi Chris Clements

Yes you can. this script here:

NWF.FormFiller.Events.RegisterAfterReady(function () {
 alert('Current User');
});

will alert you to the current user on page load. you should be able to access all of the common variables. I think you do need to use the "insert reference" burtton though

common_variables‌ javascript‌


Forum|alt.badge.img+4
  • Author
  • May 8, 2017

‌ you are absolutely right, thank you sir!

For those of you following along, note the single quotes seem to be required happy.png


Forum|alt.badge.img+7

Glad to help!!


Forum|alt.badge.img

Does "Common" variable work from a .js file? I was trying to refer {Common:IsNewMode} in a .js and can't get it to work. It works in Nintex forms designer custom javascript section.