Skip to main content
Nintex Community Menu Bar
Question

How do I obtain an existing List component on the page via the Javascript API

  • July 10, 2024
  • 1 reply
  • 5 views

Forum|alt.badge.img+1

I have a queue on my page (a List), and I need to be able to programmatically access its selected item(s) from JavaScript. I see that in the docs for the List object there is a method called getSelectedItems that gives me the selected items.

My problem is I do not know how to obtain the List instance for my particular queue on the page.

This topic has been closed for replies.

1 reply

Forum|alt.badge.img+13
  1. Give your Queue component a Unique Id, e.g. “MyQueue”, from the Page Composer.
    2. From JavaScript, do this: 

    var queue = skuid.$(‘#MyQueue’);
    if (queue && queue.length) {
       var list = queue.data(‘object’);
       var selectedItems = list.getSelectedItems();
    }