cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

client id in javascript variable not getting created..what might br the reason?

Jump to solution

I am trying to set end time field in SharePoint calendar for that I need client id...can any body help me with this?

Labels: (1)
Tags (1)
0 Kudos
Reply
11 Replies
Workflow Hero

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Can you explain a bit more your need ?

Do you need the client id of a date time control in a form ?

0 Kudos
Reply
Not applicable

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Hi Caroline...yes we need client id but it seems that its not working for any of the control on nintex form(we have explicitly enabled this option on all control)....We are not sure why it is not working.....actually we want to set value of time part of date/time control..so that we can set those value on form load...

0 Kudos
Reply
Workflow Hero

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

You can set the value of the hours and minutes like this :

 

NWF$(document).ready(function(){

var dateTimeControl = NWF$('#' + myDateTimeClientID);

dateTimeControl.siblings('[id$=DateHours]').val("12");

dateTimeControl.siblings('[id$=DateMinutes]').val("00");

});

 

With "myDateTimeClientID" the value you populated in the settings of the date time control :

And 12 and 00 the hours and minutes you want to set.

 

Hope this helps

0 Kudos
Reply
Not applicable

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Thanks for your help...but my issue is that Client ID is not getting generated...when i load the form we are getting error

'VarClientId' is undefined" that mean some how the form setting for storing client Id is not working for me....

List: Calendar

My Current settings:

0 Kudos
Reply
Workflow Hero

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Do you include JQuery ?

Nintex already include JQuery and it can generate errors if you also include another version of JQuery in the form or in the master page.

I've also noticed that there's a capital "V" in the name of your variable in the error (VarClientId). Have you correctly copied/pasted the name of the variable you've set in the settings of the control (i) ?

0 Kudos
Reply
Not applicable

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Hi Caroline...thanks for your help...I don't know what was wrong but issue got resolved and I am able to get variable value....

0 Kudos
Reply
Not applicable

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

is possible to get metadata field value from form field using same approach? can you please provide any example for extracting metadata field value as I have site workflow and I need to extract value from metadata field

0 Kudos
Reply
Workflow Hero

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

I don't understand your need : do you want to get a managed metadata field value populated in a site workflow start form ?

0 Kudos
Reply
Not applicable

Re: client id in javascript variable not getting created..what might br the reason?

Jump to solution

Hello Caroline,

I'm getting the same error Rahul got.

I'm asigning 'textarea' as my control client id variable, but when i'm trying to access it through javascript in a button as "NWF$('#' + textarea), i got the 'textarea' is undefined error.

I've checked the names to be the same, but i'm still getting that error, is like it's not being generated. The same happens when i add a class to the control y tried to use the class selector.

I haven't included Jquery to the form.

Can you help me?

0 Kudos
Reply