Stumped on setting state with a "thing"

I have a thing associated with each item in my element. When you click on it, I want to set the “last_selected_node” state field. My element is based on a Jquery plugin and has an event handler for clicking that looks like the code below. I have tried it both with a stored “thing” and with a new “thing” gotten from the databse APi (this latest version.) In either case when I call publishState with the “thing” object I get the exception below the code.



inst.on(“select_node.jstree”, function (e, data) {
console.log(“node selected”);
GetBubbleRecord(,result => {


Calling evaluate_property outside of an autorun or watcher
at e.evaluate_property (
at o (
at C (
at a (
at T (
at e.state (
at T (
at Object.M.t.publishState (
at eval (PLUGIN_TreeView–testing–initialize–TreeView-.js:48:23)
at Object.eval [as success] (PLUGIN_TreeView–testing–initialize–TreeView-.js:7:16)
at i (
at Object.fireWith [as resolveWith] (
at A (
at XMLHttpRequest. (

I figured it out. There is an asymmetry in bubble’s javascript API.

AppType input fields return the actual record data, however AppType output fields require the ID of the record.

This should be much better documented.