You are viewing limited content. For full access, please sign in.

Question

Question

{/_currentuser_display} instance question?

asked on August 18, 2015

Hi there,

      Did anyone ever have an experience with assigning the {/_currentuser_display} variable to a single line field in javascript page like this ?

$(document).ready(function () {
  $('#q70 input').val({/_currentuser_display});
  $('#q70 input').trigger('change');

});

I tried to do this but it didn't work.

I would like to use the same account field for all forms through business process modeler so I set {/_currentuser_display} instance as default to the account field of  first form and then changed value of this field in javascript page of each form.

Any help is appreciated, Thanks.

0 0

Replies

replied on August 25, 2015

You can use the {/_currentuser_display} variable to populate a field, as shown in your screenshot. However, you cannot directly use the token in your JavaScript, it is not parsed by Forms. 

1 0
replied on August 25, 2015

Thanks a lot for your answer!

0 0
replied on June 16, 2020

Although this is old post, but I think I should post a better solution for this so that anyone reaching this looking for an answer may find this useful; The best way to keep a (dynamic) token as default value and keep that field refreshed on each form is to add a field rule that hides the field and use "Ignore the data when the field/section/page is hidden" option. This way it will not save the default value when submitted and the next time it will get an updated token value (for example current user).

If you want to show the field, you'd add another field and have it copy the value using advance/calculation setting.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.