Link to plugin page: https://zeroqode.com/plugin/zeroqode-toolbox-plugin-for-bubble-1643016115055x352914366133058940
This free plugin is a list of tools for working with bubbles. It enables you to Run JavaScript code as well as Generate JSON objects with relevant data for doing an easy search inside your DataBase. Imagine you have an app with stores and you'd like to find orders made in them in a radius of 100 km. This plugin helps lightly filter the information you need by keyword and location. Additionally, it helps you to capture errors from the console logs from your app.
INSTRUCTIONS:
The plugin comes with four elements: CustomJS, Search, Error Capture, and Parse XML.
The plugin comes with four elements: CustomJS, Search, Error Capture, and Parse XML.
This element initializes your custom javascript.
Fields
Title | Description |
Return a list | If you want to return a list in the states, enable the checkbox |
Code js | When you want a state to be returned it is necessary to call the function "zeroQodeExportDateinState function (ValuForState)". |
Event name | Triggered when |
Custom JS Completed | This event is triggered when JS has run successfully. |
Custom JS Error | This event is triggered when your script returned an error. |
State title | State value |
Return your value | if you returned a single value, it will be contained here. |
Return your list with values | if you returned a list of values, it will be contained here. |
This element is used for a search for values by a given key from the database on the backend side and generates a JSON file.
Fileds:
Title | Description |
Type of Content | Set here the data type that belongs to the plugin (Bubble search result). |
Get Data from Search - it is an action that will return data from the database according to the constraints that will be set by you.
Title | Description |
Object Type | select the object you want to search |
Selected fields | write the name of the fields you want to receive. |
Key | This is the name of the field to which the constraint applies. You can also use the reserved key _all for full-text database searches. |
Constraint_type | This is the type of constraint you want to apply. It can be:
|
Value | This is the value against which the constraint should be compared. This can be a string, a number, a list, and so on, depending on the type of field defined by the key in the current constraint. If the value type is invalid, Bubble returns a 400, "INVALID_DATA" error. The value must be at least 5 characters. A particular case of a key of type address and a constraint_type set to geographic_search, the value should be an object with the following keys |
Origin_address | The central address that defines the center of the search, should be a string address. |
Range | The range of the radius, is defined in miles or kilometers, depending on the unit. |
Unit | The unit to use for the search. It can be miles (default) or km. Constraints with an undefined value are ignored. Do not use '_id' as a key for a constraint. Instead, use the call that retrieves a thing by ID. You can control how the list is sorted using two parameters: sort_field and descending |
Sort field | Specify the field to use for sorting. |
Descending | This parameter can either be true or false (default). |
Download JSON | enable checkbox if you want to download the JSON file. |
File Name | JSON file name |
State title | State value |
Result | Contains lists of data grouped by user-defined field names. For instance, If you set the Selected fields to be Types, description, geographic_search, number then in the Result Bubble Object state, you'll have access to the aforementioned fields in this fashion: field1 to get Types, field2 for description, and so on ... Each of these fields is a list of values from your Bubble object. So, field1 # 1 is the first name item from your Bubble object, field1 # 2 is the second one, and so on ... |
| |
If you think that one of our plugins is throwing an error, all you have to do is place this element on the page where the problematic plugin is located, and the error will be reported to the Zeroqode team, and when contacting our support team, they will have additional information.
This element will help you to display the XML template in a repeat group.
Convert Parse XML- this action will help you display an XML in the Repeating Group.
Fields
Title | Description |
XML Content | enter the XML content. |
Selected fields | select the fields you want to get from XML. |
State Title | State Value |
Result | Contains lists of data grouped by user-defined field names. For instance, If you set the Selected fields to be, then, in the Result Bubble Object state, you'll have access to the aforementioned fields in this fashion: field1 to get name, field2 for price, and so on ... Each of these fields is a list of values from your XML. So, field1 # 1 is the first name item from your XML, field1 # 2 is the second one, and so on ... |
If you need to save a JSON or XML to the database, create "backend workflows in the API", setting in the action of the URL plug that leads to endpoints created on the backend and the XML / JSON content
After the call has been successfully initialized, delete the word initialize.
Demo Editor: https://bubble.io/page?version=live&name=zqtoolbox_demo&id=zeroqode-demo-12&tab=tabs-1