Skip to content

Wappler documentation

Server-side Components — Original guides

Illustrated server-side components guides, with the original steps and examples preserved.

Choose a guide. Version notes identify original instructions that use an earlier interface or framework.

Guides (31)
Advanced Multi Level Nested Queries with the Database Query BuilderIntro You already know how to create nested database queries in the database query builder in order to access nested data in a single database query. In this tutorial we will show you a more advanced View guideApplying Dynamic PagingYou can add paging to your dynamic data, using the paging generator included in Wappler. First, you need to create a server action: And add a name for it. We call it - records_paged: Right click stepsView guideConnecting to a DatabaseWappler’s powerful visual server-side tools allow you to easily connect to your Database in a few clicks. Before you create your databse connection, make sure to setup the target(s) for your project (View guideCreating Custom SQL QueriesYou can use the Custom Query component in Server Connect in order to manually add a custom SQL query. You can define your own parameters, edit the schema and metadata and preview the results. CreatingView guideCreating Database QueriesAfter you created your Database Connection, now it's time to setup a Database Query. The first thing we need to do is to create a new API Action (also known as Server Action). The API Actions are locaView guideCreating Reusable Actions with Server Connect LibraryOverview Server Connect Library allows you to create reusable actions, which can be included in any of your API Actions: This way you can define some complex actions once, use input parameters for theView guideDatabase Single QueryYou can create a database query which returns a single record. That’s really useful in cases where you filter your data and expect a single result to be returned, like retrieving the logged in user inView guideDebug-Only Output for Server ActionsIntro When developing your app, it’s often helpful to see what happens behind the scenes in your Server Actions. By enabling the Debug mode , Wappler will display the output for all steps in your ServView guideDebugging Server Connect ErrorsYou can easily debug issues related to server-side processing such as - form not sending email, record not inserting or updating, query not showing data etc. The first thing you need to do is to open View guideDelete Database RecordsYou can delete database records using the built in Delete Database step in server connect. We will add a delete button to an existing repeat region, which shows the records on our page - so when clickView guideDisplaying Record Details with the Data Detail ComponentIn some cases you don’t need to show all the details of your dynamic records on the page. For example you just want to show the product name, and then when the users click the product - more informatiView guideDynamic Select MenuCreating a dynamic select menu is really easy with Wappler. First you just need to create a server action, which pulls the dynamic action from your database. After you create the query open the App CoView guideDynamic Sortable TableWith Wappler you can create responsive, sortable data tables. First, you need to create a server action which contains a database query which will be used as a data source. In App connect panel add neView guideDynamically Check Multiple CheckboxesIn this tutorial we will show you how to check multiple checkboxes, based on a database value. This is useful if you are using an update record form, or some details page which show multiple checkboxeView guideFiltering Database Query with a Text InputYou can create a real-time search with Wappler - so the results will be filtered as you type! We created a database query and displayed the results on our page. You already know how to create a databaView guideFiltering Database Query with an URL ParameterIf you don’t know how to define an URL parameter on your page, please check this tutorial as you will need this later. First, we need to create a server action. Open the server connect panel and clickView guideFiltering Database Query with Multiple CheckboxesYou can use multiple checkboxes in order to filter your database queries. In our example we already created a server action with database query which shows the products in a dynamic table. It shows alView guideGenerating an unique UUID identifierIntro You can quickly generate an unique UUID identifier in Server Connect and use it in your API Action (Server Action) steps, where required. Generating UUID The UUID is available in the global valuView guideGet Inserted Record IDThere are some cases where you need to get the inserted record ID, for example - use it in another insert step, filter a query, update some data in another table etc. In our example we will show you hView guideInsert Database RecordCreating an insert record form with Wappler is an easy task as Wappler generates the form for you. The first thing you need to do is to create a server action, so open the Server Connect panel: Then, View guideJoin Results of 2 Data CollectionsIntro Using the Data Transformations options you can easily join the results of two different data sources such as - a database query and an API response, the results of 2 database queries from 2 diffView guideLoop Through Database Records with the Data Iterator ComponentUsing the Data Iterator component you can display one record at time on your page and loop through all records, using previous, next, first, last, random, or go to specific record dynamic actions. TheView guideSending a Value for Unchecked Checkbox on Database Insert / UpdateIntro In many cases you need to use checkboxes in the forms used to insert or update data in the database. Due to the nature of the checkboxes and how they work , when a checkbox is not checked it wonView guideSending Form Data to EmailYou can send form data to email thanks to the mailer component integrated in Wappler. This is useful for contact forms, inquiry forms, reservation forms or any other form which data needs to be sent tView guideServer Side Includes (SSI)It is very common in web development that you reuse a component on different pages, so that when you change something it is being updated everywhere. In Wappler you can create and re-use server side iView guideUsing Data Transformations in Server ConnectData Transformations Data Transformation options are available in Server Connect. Using them you can easily combine different data sources, add, rename or remove columns from an existing data set. TheView guideUsing Globals in Server ConnectIntro The Globals allow you to define and re-use Database Connections and other Settings (1), Variables / Input Parameters (2) and API Action Steps (3) across all your API Actions in the project: WhenView guideUsing Nested Queries with the Database Query BuilderIntro You can access the nested data created with the help of sub tables using a single database query in your API Action. This way you don’t need complicated workflows such as using repeats and nestiView guideUsing Session VariablesIn Server Connect you can define, use and re-use Session Variables. Once you define your session variables, they become available to choose in the dynamic data picker. Defining a session variable is eView guideUsing Set Value in Server ConnectThe Set Value step in Server Connect can be useful in many cases. You can think of it as a variable where you can store any kind of static or dynamic values. These values can then be accessed in any oView guideWorking with Server Connect Array ListsIntro The Server Connect Array List component allows you create and manipulate Array Lists easily with Server Connect actions. You can add items to an array, join multiple sources, remove and set arbiView guide