Toolbox plugin - collection of utility elements

Hi @eftomi

I am facing this same issue. I am using Get data from an external API (SQL DB Connector) in List item expression and seeing the same error.

Were you able to figure out any solution, if so could you please guide me here ?

Geez you guys. Someone post a link to an editor and someone (prolly not me) will help you out… @mishav hasn’t been around here in many moons.

(Don’t go freaking out about that: This plugin is no big whoop.)

So, let’s go with the editing URLs already…

I ended up building around the problem and removed the need for the plugin entirely for now.

Since the plugin doesn’t seem to play nicely with API Connector results I created a new set of data types to hold the data (basically a shopping basket) with a field for the calculated value I needed and one for the API result.
As user adds items to the basket; in a workflow I calculate the value needed (A divided by B) and put it into the corresponding field.
When the basket is emptied I copy the contents of the basket into a History-field (i.e. a list of Baskets) and I can now show the trend over time.

I only have 800 users right now but potentially this approach could be a good thing from a performance perspective as I do less calculations when showing the trend. Time will tell.

Great plugin, I may have found an issue:
Anyone else having this problem?
console.log doesn’t run when a custom workflow is scheduled. Not sure about other toolbox things running on scheduled customs. Note: triggered is fine but scheduled i.e. delay by ā€œ10ā€ seconds won’t log or alert.

I’m currently running into an issue I just can’t see around.

I’m using a custom HTML element that’s mostly used for a mapbox map. Right now, when a marker is clicked it opens a popup. I’d also like this click to send bubble the ID of the item being clicked. I’m able to set a variable for the ID when it’s clicked, but the bubble_fn_ID(variable) always just comes back as undefined even though ID is the suffix in the toolbox element on the page.

Any ideas what I may be missing?

As a suggestion from Eve, I’ll tag a couple folks: @funwtp, @seanhoots, @JonL, @yusaney1 - Thanks in advance!

Can you share editor?

Hey Jon,

Thanks for replying: https://bubble.io/page?type=page&name=explore_dummy&id=malls&tab=tabs-1

You can see the call at the bottom of the HTML element.

Thanks in advance!

David

The editor doesn’t seem to be opening for me…

I am similar issue (with element ID) somewhere else too at the moment too. Let’s see whta you have in the editor, and then I may go to Bubble.

@JonL

Sorry, I needed to make it public. Try again?

Some thoughts:

I can see that your map is being built by the HTML elements which is in term is feed with some values…

I cannot see where you feed ID’s to each ā€œmarkerā€? What ID would be sent is I click on the marker?

Sorry for the delay, I missed the email on this one…

each marker is defined by a JSON object that has some properties inlcluding lat/long and label. The click is already selecting the marker and I would want to send the label or I can add a field in the JSON that is specifically for an ID, but how do I send the ID anywhere?

I fiddled some more and I was able to print the right UUID to the console, but it still just says image and the Javascript suffix is 1.

So shouldn’t it be able to read the input from the HTML if the line in Javascript is bubble_fn_1(label).

image

@funwtp

To be honest, I kinda see why it may say ā€œundefinedā€. Try to find an example where ā€œbubble_fn_… (…)ā€ is used. I will try to, and come back to you.

I need to import two js files before I run a server side API workflow and I’m not sure how to do that.
Is there a way to import a js file in a server script action ?

Hi @mishav
Awesome plugin. I have a quick question I hobe you can assist with.

I have an rg that is populated by an api call. When I try to use the list item expression together with either:

JSON.stringify({ā€œidā€: item().lookup(ā€œidā€)})
OR
JSON.stringify({ā€œidā€: Search Results’s List of Searchs’s id})
OR
JSON.stringify({ā€œidā€: field(ā€œidā€)})

…I get an error. I can get the list item expression to work fine with things that I get from the db, but is it a limitation that its not possible to do with items not yet in db like that from an api call?

Ps.: The rg is populated with anywhere from a few to several hundred items. I need to use an api call as the data is from a third party, but after the user clicks ā€œsaveā€ i need to do some further processing outside bubble, hence I want to shoot a quick api call with all the items to my other service. I could wait for a workflow on a list to finish to create each item and then extract everything from the db, but that would make the wait for the user longer.

The ā€œidā€ value is not bubble-id, its from the json which is formatted like:

[{
ā€œidā€: ā€œ42basg-414-ada324-2344ā€,
ā€œa valueā€: ā€œabcā€,
ā€œanother valueā€: 1
}]

Thanks in advance!
Simon

1 Like

HI.
Great plugin.
But have some issues. Not sure it’s the plugin’s fault.
I used the plugin to create array of times. Everything worked fine, until today)
Don’t know what happened.
Thought first that maybe I broke something, but when I tried it on a ā€œbackupā€ page, it neither worked (((
here is the code:

   timeListMine=[];
    var d=new Date('2019-10-30');
    var sDate = new Date(d.getFullYear(),d.getMonth(),d.getDate());

    for(i = 0; i < 1440;i+=30) {
    var dS = new Date(sDate.getTime()+i*60*1000);
    var dE = new Date(sDate.getTime()+i*60*1000+30 * 60 * 1000);
    timeListMine.push([dS,dE]);
    }

    var result = ""+JSON.stringify(timeListMine)+"";
    result;
    timeListMine

dataType is date-range list.
The problem is that in a repeating group it doesn’t get the data for some reason (it used to before today)
I tried to stringify then parse the JSON, nothing works.
When I try to get 1 date-range (for example timeListMine[1]) it works perfectly.
But when I try to get the list it returns ā€œnullā€

Does anybody know how can I handle that? What can be the problem?

Hi!

First of all thanks so much for this amazing plugin!

I’m not sure if this is the best channel for feedback, but I wanted to let you know of a potential bug.

While my expression is working well on Chrome and Safari, it’s not working on Firefox.

This is what it looks like in the builder:
image

And this is the error on Firefox:

The plugin Toolbox / element Expression threw the following error: UnexpectedError Expected a date, but got a object (original data: null)
JS_to_bubble@https://dhtiece9044ep.cloudfront.net/package/run_debug_js/6d3f90241a3a734b66a5c1eb51432717d9c9f9e1681b6c690ea76f575b922de5/xfalse/x5:13:601481
[101]</</i</e.prototype.JS_to_bubble@https://dhtiece9044ep.cloudfront.net/package/run_debug_js/6d3f90241a3a734b66a5c1eb51432717d9c9f9e1681b6c690ea76f575b922de5/xfalse/x5:13:1782575 (please report this to the plugin author)

Thanks for taking a look into this!

I fixed it. Firefox is more strict with the parameter in new Date() and if I make it follow the
YYYY-MM-DDTHH:mm:ss.sssZ format, it all works out!

1 Like

This is a great plugin that is a savior when it comes to financial calculations!

Unfortunately, I’m running into a few errors all of the sudden, and can’t seem to decipher the error logs:

The plugin Toolbox / element List Item Expression threw the following error: SyntaxError: Unexpected token ā€˜*’ at toolboxEval (https://dd7tel2830j4w.cloudfront.net/f1531838926669x106800532434135680/toolboxeval.js:1:181) at eval (PLUGIN_Toolbox-update–List-Item-Expression-.js:1:238) (please report this to the plugin author)

Expression: (1+r/n)^NT

The plugin Toolbox / element List Item Expression threw the following error: SyntaxError: Unexpected token ā€˜,’ at toolboxEval (https://dd7tel2830j4w.cloudfront.net/f1531838926669x106800532434135680/toolboxeval.js:1:181) at eval (PLUGIN_Toolbox-update–List-Item-Expression-.js:1:238) (please report this to the plugin author)

Expression: (1+(r/n))

The plugin Toolbox / element Expression threw the following error: SyntaxError: Unexpected end of input at eval (PLUGIN_Toolbox-update–Expression-.js:1:73) at https://dhtiece9044ep.cloudfront.net/package/run_debug_js/1fbba0abc51dc67dc02d293980a57c6d749be00d1d8510da92941669622aa441/xfalse/x5:13:1955868 (please report this to the plugin author)

Does anyone know how I can correct these?

2 Likes

Hi @simon7, did you ever solve this?
Cheers, Andrew