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


Badge +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

Userlevel 4
Badge +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‌

Badge +4

‌ you are absolutely right, thank you sir!

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

Userlevel 4
Badge +7

Glad to help!!

Badge

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.

Reply