Skip to main content
Nintex Community Menu Bar
Question

How to pass Id in onClick function inside template field

  • July 10, 2024
  • 2 replies
  • 35 views

Forum|alt.badge.img+4

I have a template field inside which i have written some html code.

now onClick of template field link i want to pass id to the onClick function.

I am trying this , 

onClick = “openPrimaryTab({{{Id}}})”

but i am getting error - 

Uncaught ReferenceError: a1x190000007F1YAAU is not defined


And if i use {{{Id}}} in javascript function , i am getting same Id for every record , whereas i should get different id according to the row clicked . Hence i thought of above solution,but it is giving error.

Can someone help to reslove?

This topic has been closed for replies.

2 replies

Forum|alt.badge.img+18

I believe if you put your {{{Id}}} in quotes, you should get the desired behavior:

onClick = “openPrimaryTab(‘{{{Id}}}’)”


Forum|alt.badge.img+4

Thanks Matt! It worked:)