Skip to main content
Nintex Community Menu Bar
Question

javascript newb question - snippet that can work from several components

  • July 9, 2024
  • 5 replies
  • 7 views

Forum|alt.badge.img+20

I’ve got a snippet I’d like to run from both a row action and page title component. How can I dynamically set the row?

Row Action row var
c1c4652fa73af885c8d4f5b76fe6cd305e8cf862.png

Page Title Button row var

This topic has been closed for replies.

5 replies

Forum|alt.badge.img+4

row = arguments[0].hasOwnProperty(‘item’) ? arguments[0].item : arguments[0].row;


This is called a ternary if statement, it checks if arguments[0] contains a property item. If yes it assigns to row arguments[0].item, otherwise it assigns arguments[0].row


Forum|alt.badge.img+20

Cool. Trying to trick me though? Found a typo.


Forum|alt.badge.img+20

And it was missing the .row in arguments[0].item :Pat


Forum|alt.badge.img+20

Sweet. Works.


Forum|alt.badge.img+4

It was a typo that I corrected 🙂