Add Object to Vertex from Workshop Widget

Hi There :slight_smile:

Suppose I have a workshop app with a vertex graph and an object list. I’d like to be able to add an object that is displayed in the object list right to the vertex graph (ie without using the “add objects” search functionality in vertex). Is this currently possible?

Thanks

In terms of an out-of-the-box interaction to get an object in the object list to the vertex graph, there currently isn’t one (e.g. dragging an object from the list into the vertex widget). However, there are a couple low lift set-ups that you can use to get this functionality.

For example, you can have an Action that takes the Active object in the Object List and adds it to the Object Set that is backing the Vertex widget. You can then trigger this Action with something like a Button with “Hide form and apply immediately if valid” toggled on for a pretty smooth workflow of 1) click on object in list, 2) click on button to add it to Vertex.

There’s an “Add objects to subgraph” under the interaction sub-heading of the widget config. Any objects added to this object set will get added to the graph, so if you just want to add the selected object in a list, you can set this to the lists’s “Active Object” set.

Struggling with two things here:

  1. Doing a generic object set merge. There are several different object types in my graph, and I am struggling to write a function that can merge any of of those types into an objectset with many different possible types
  2. If I update the object set that defines the graph, won’t it re-render the whole graph?