Reading list of custom database objects from plugin

Hello friends,
I have a problem that has been hurting in my mind for 3 days now. So far I’ve been able to develop my plugin thanks to @maxime12’s question, but this problem is preventing me from moving forward.

I’m building an app to assess developmental disorders in children. One big part of the app is evaluating forms that parents fill in and redirecting them to the relevant page. All questions are stored in one table and answers stored in another table. I’m now developing a client-side plugin for private use to evaluate the forms.

Thanks to @exception-rambler’s reply to Maxime12’s question, I’m planning to use instance.publishState(“stateName”, value) to feedback the result of the form back into the Bubble app.

My problem is that while trying to read the form answers for a user (stored in the database), I do a “Search for…” from the workflow, then pass the list I get as argument to the plugin, but once in the plugin I get a kind of objects that I don’t know how to parse.

So my arguments for the plugin are:
Screen Shot 2020-06-11 at 5.40.59 PM

And my code is:

But what I get in the console is:
Screen Shot 2020-06-11 at 5.42.58 PM

And I’m unable to access any information in that {get: ƒ, listProperties: ƒ, __original: ƒ} object. I was expecting it to have properties with values, but couldn’t make it work.

Any ideas?

Many thanks!

I found the solution. I was not aware that what I was getting were other objects that also had properties. So nesting the .get(‘field’) solved my problem.
My code is now like listObjects[c].get("question_custom_surveillance_questions").get('question_text');

1 Like