Hi there!
I am building a workshop application with an embedded vertex graph.
I want to be able to select two different nodes, of different types, within the graph and then press a button that creates a link between them.
I have a button that is connected to an appropriate ontology action that will link the objects, but I can’t quite figure out how to get my selection of two objects in the graph widget to go into the two separate variables that the button action expects as parameters.
Perhaps there is a way to do this, or perhaps there is a better approach entirely. Any help is much appreciated
Hey!
I’m assuming what you currently have is one variable that contains both selected objects, one of Object Type A and one of Object Type B.
To separate the object set variable into two Object Sets, one of type A and one of type B you can:
- Create an Object Set variable from an object set definition and filter for the Primary Key property of Object Type A being “not null”. This will give you an Object Set containing Objects of Type A only.
- Create an Object Set variable from an object set definition and filter for the Primary Key property of Object Type B being “not null”. This will give you an Object Set containing Objects of Type B only.
This will work assuming the property_id of the primary keys is not the same on A and B.
Hope this helps!
Will
1 Like