Skip to main content
Nintex Community Menu Bar
Question

How to get merge field value in JavaScript when I use {{Name}} it does not give any value.

  • July 10, 2024
  • 3 replies
  • 14 views

Forum|alt.badge.img+1

How to get merge field value in JavaScript, when I use {{name}} it does not give any value. Ex: var name = {{name}}

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+18

you can use merge syntax in javascript (here), but you’re probably better off getting the value of the field through the skuid.model.Model api directly.


Forum|alt.badge.img+1
  • Author
  • July 10, 2024

I have checked the syntaxes, so if i want to get accounts data i can use below:
 var acc = skuid.model.getModel(‘Account’);
//to get the particular row
var row = acc.getRowById({{id}});

but this is not working I am not able to get id value here…


Forum|alt.badge.img+18

The only way to use merge syntax in javascript is with skuid.idols.merge() or something similar. Javascript will not process merge syntax on its own. .getRowById() is looking for an id string. Generally, model.getFirstRow() is the way to go.