Hi,
You need to add an output flow variable at the bottom of the Generic JavaScript View’s configuration dialog, then you can use the following code at the end of your plotly_selected event handler:
FLOW_VARIABLES["selection"] = JSON.stringify(selection);
Now the selection will be available as flow variable named “selection”. I encoded it as JSON, so to process it further, you’d need to turn the variable into a table row and then use a JSON Path to get the individual RowIDs.
Please find the modified workflow attached.
Kind regards,
Alexander
20230619 Pikairos JavaScript View Get Coordinates as a Variable.knwf (30.4 KB)