In an API workflow, I want to take some data from one of the fields in the database in a workflow step (1), run a series of math calculations on it in the next workflow step (2), and use the result in a subsequent step (3).
Everything in an API workflow runs on the server, so client-side code is not available. For custom plugins, Bubble has not yet turned on the server-side code.
If you canât find a workaround using Bubbleâs functions, your options are:
@emmanuel
Any plans to enable this ability ?
Looks like these awesome plugins being developed for the community are currently not unusable with api workflows
I was hoping to use List Item Expression to help me get a list of dates.
I used List Of Numbers to get a list of offsets (0,1,2,3,etc) and I was going to add current date/time to each one to get a list of dates, but that doesnât seem to be working cuz I canât type âvalue()â into the â+daysâ expression.
@mishav This is a great plugin! Iâve been able to replace the Bubble date/time picker with the native one for a much better UX.
My question to you is whether this would allow me to use a javascript onClick event to store an input as a state in Bubble. For example, I have a feature where users can set the time slots that they are available for appointments. I use three steps to store data from the js input onto a thing:
Currently, I can store the js input as a state only after running a workflow (the save button). Since I run other workflows based on the value of that input - rather than store it directly - I have to use the confirmation screen to trigger those other workflows.
What Iâd like to do is store the js input as a state immediately on clicking the date, rather than running a workflow to store it. Would that be possible with some kind of js onClick event?
I have some troubles with List Item Expression though, together with Get data from an external API (SQL DB Connector). The data is a list with three fields.The Source item type and Data source are properly defined. However, when I try to reference the field with field("Name"), I get âUnable to get property â%f3â of undefined or null referenceâ error in debugger. I see that the data is there, the name of the field is OK, but still the List Item Expression doesnât give any output.
If I test a similar data structure with internal Bubbleâs data type, it works OK.
Yes, you are on the right track with thinking about an event. If you include an element Javascript To Bubble, and configure it to expose a value as well as trigger a workflow event, you can have another workflow based on this event to put the value in a custom state.
This workflow event can be triggered from within your javascript event handler by calling the function bubble_fn_yourname(value), see examples on the demo app or as described further up in this thread.
Sorry to say that List Item Expression isnât able to handle data structures added by API or SQL plugins. Yes it would be nice, but I wasnât able to discover their in-memory storage structure in the time I had available.
This is a great plugin!
However I was wondering if I could use it to build a nested JSON. I want to show the JSON to the user in the frontend (and ultimately use a âcopy to clipboardâ button for an easy copy/paste flow for my user).
Iâm playing around with the ListItemExpression but cannot figure out how to use it or if itâs possible at all.
I have different database tables:
Goal
â Goal_Name
â List_of_Subgoals
Subgoal
â Subgoal_Name
â Belongs_To_Specific_Goal
â List_of_SubSubGoals
SubSubgoal
â SubSubgoal_Name
â Belongs_To_Specific_SubGoal
So in the Bubble universe I can adress each of them because they are all connected (list_of or belongs_to). How can I adress these things with the ListItemExpression and how can i tell the plugin to e.g. show all subgoals of a goal (like in a JSON).
Is it possible to achieve this with your plugin?
Thanks!
Thanks for the quick reply, @mishav!
I already tried it but failed. But good to know that it will work eventually. Will tinker around with it a bit more and try to figure out how to adress different database tables.
Thanks again!
Iâm really sorry to bother you again @mishav but maybe you can help me out on this one.
I tried everything and read a lot but canât figure out how to access a list_of_items.
I made an example for easier access in the forumapp: Editor Viewer
It follows the logic i described in my earlier post (Goal, GoalSub, GoalSubSub) where 1 Goal can have 1-n GoalSubs and 1 GoalSubs can have 1-n GoalSubSubs.
I can manage to access another database table when there is a 1:1 relationship (e.g. display GoalSub and the Goal to whom it belongs).
But I cannot access a list_of_items when there is 1:n relationship (e.g. 1 Goal has n SubGoals).
Knowing that I didnât want the element visible on the page, I unchecked âThis element is visible in page loadâ. Apparently this also disables functionality of the element. After I checked the box, the list was populated. The element is invisible anyway.