* add custom resolvers info and editable row selection info (#9057) * fix system requirements icon * add auth info for webhooks and fix casing * add regex custom validation info (#9068) * [docs]: Marketplace 1.7 updates (#9085) * [docs] Amazon redshift plugin * make minor improvements * add and update docs for marketplace 1.7 * update order of plugins in overview to match sidebar * create new version --------- Co-authored-by: Shubhendra <withshubh@gmail.com> * add the latest version in the versions.json file (#9094) * [docs]: Update PDF component (#9088) * update PDF component * merged with develop and added changes to the new version * update docs favicon: (#9118) * [docs] SSO revamp (#9031) * add method to set default language * update image settings through custom css and update screenshots for getting started and tooljet concepts (#9158) * fix read documentation button * fix formatting for setup icons (#9172) * fix sidebar link for aws lambda * Update static media (#9175) * updated the screenshots * reduced the gif size * reverted the package.json file * edited the zoomed in images and replaced some gifs with screenshots * removed one gif * update static media * update file names * update toolbar * fix file names * fix: dynamodb img path * update media for org management dashboard * fix: casing and formatting * update workspace constant media * update media in workspace settings and github * update github sso * minor change to github sso docs * minor fix * update google sso * change includeCurrentVersion flag to false --------- Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> * Feature: Engagespot plugin (#9012) * feat(plugins): added engagespot plugin * feat(docs): added engagespot plugin docs * chore(engagespot-plugin): revised copywritings * Feature: Databricks data source (#9174) * plugin-created * Databricks integration * icon, error handling * removed unrelated changes from marketplace and frontend package-lock.json removed runAsync and maxRows timeouts pending * timeout implementation * socket timeout and error handling * resolve comments * resolve comments2 * solved render issue test connection improvements * solved undefined error * fix TJDB not null value fail for is operation (#9055) * fix TJDB not null value fail for is operation * handling not null and null case insenstive values * Support for marketplace plugin deploy on render preview app (#9221) * Fix for marketplace error on render preview app * add marketplace build command * Adding new workflow for building marketplace plugin * removed render app creation * [:docs] Add documentation for Databricks plugin (#9224) * add docs for databricks * update databricks docs * update docs * remove ref to clusters * bump to v2.34.0 * Fixed data source cypress failure (#9227) * updated spec with required text * updated mongodb and import spec * updated import spec --------- Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Midhun G S <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Aman Regu <amanregu@gmail.com> Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Jobin Jose <129726530+jobin-logidots@users.noreply.github.com> Co-authored-by: Syed Mohammad Akhtar Rizvi <85864291+ShazanRizvi@users.noreply.github.com> Co-authored-by: blank0537 <111295371+blank0537@users.noreply.github.com> Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
4.6 KiB
| id | title |
|---|---|
| use-custom-parameters | Use Custom Parameters |
Custom parameters in your queries offer a flexible way to introduce variables without directly modifying query parameters. This guide will walk you through creating, utilizing, and calling queries with custom parameters.
Adding Custom Parameters
- Open the query panel and select the query you want to add custom parameters to.
- Navigate to the Parameters section in the top bar.
- Click the + button to add a custom parameter.
- For each parameter, specify:
- Name: Identifier for the parameter.
- Default value: A constant string, number, or object.
Syntax for Utilizing Parameters
Use parameters.<identifier> in your query to employ custom parameters. Note that parameters can only be used within the query where they are defined.
Example: Create row in ToolJetDB with Custom Parameters
Let's assume we have a ToolJetDB table with the following columns: name, email, and contact. We will create a new row in the table using custom parameters.
-
Create a new ToolJetDB query, select a table from the dropdown and select the
Create Rowoperation. -
Add the following parameters:
- name:
nameand value:Shubh - name:
emailand value:shubh@email.com - name:
contactand value:4638563845
- name:
-
Add the columns to the query and use the custom parameters to set the values.
Column Value name {{parameters.name}}email {{parameters.email}}contact {{parameters.contact}}
-
Finally, execute the query to create a new row in the ToolJetDB table with the values provided in the custom parameters.
Example: Providing Custom Parameters using Events
In this example, we will demonstrate how to use custom parameters in a query by providing values from an event. We will use execute a REST API query and on its success, we will execute the ToolJetDB query to create a new row with the response data.
-
Create a REST API Query:
- Method:
GET - URL:
https://reqres.in/api/users?page=2
- Method:
-
Add a Success Event:
- Name:
onSuccess - Action:
Run Query - Query:
Create Row - Parameters: The parameters that you have added to the query will automatically be available in the event.
- name:
{{queries.getSalesData.data.data[0].name}}This will use the name from the first record of the response data. - email:
{{queries.getSalesData.data.data[0].email}}This will use the email from the first record of the response data. - contact:
4638563845provided as a constant value just for demonstration.
- name:
- Name:
-
Execute the REST API query and observe the new row created in the ToolJetDB table.
Note: You can also use parameters in JavaScript queries. Learn more about JS Query Parameter.