Blog

Building intelligent business workflows with Actions and SQL Business Rules.

Labels
AJAX(112) App Studio(9) Apple(1) Application Builder(245) Application Factory(207) ASP.NET(95) ASP.NET 3.5(45) ASP.NET Code Generator(72) ASP.NET Membership(28) Azure(18) Barcode(2) Barcodes(3) BLOB(18) Business Rules(1) Business Rules/Logic(140) BYOD(13) Caching(2) Calendar(5) Charts(29) Cloud(14) Cloud On Time(2) Cloud On Time for Windows 7(2) Code Generator(54) Collaboration(11) command line(1) Conflict Detection(1) Content Management System(12) COT Tools for Excel(26) CRUD(1) Custom Actions(1) Data Aquarium Framework(122) Data Sheet(9) Data Sources(22) Database Lookups(50) Deployment(22) Designer(178) Device(1) DotNetNuke(12) EASE(20) Email(6) Features(101) Firebird(1) Form Builder(14) Globalization and Localization(6) How To(1) Hypermedia(2) Inline Editing(1) Installation(5) JavaScript(20) Kiosk(1) Low Code(3) Mac(1) Many-To-Many(4) Maps(6) Master/Detail(36) Microservices(4) Mobile(63) Mode Builder(3) Model Builder(3) MySQL(10) Native Apps(5) News(18) OAuth(9) OAuth Scopes(1) OAuth2(13) Offline(20) Offline Apps(4) Offline Sync(5) Oracle(11) PKCE(2) Postgre SQL(1) PostgreSQL(2) PWA(2) QR codes(2) Rapid Application Development(5) Reading Pane(2) Release Notes(184) Reports(48) REST(29) RESTful(29) RESTful Workshop(15) RFID tags(1) SaaS(7) Security(81) SharePoint(12) SPA(6) SQL Anywhere(3) SQL Server(26) SSO(1) Stored Procedure(4) Teamwork(15) Tips and Tricks(87) Tools for Excel(3) Touch UI(93) Transactions(5) Tutorials(183) Universal Windows Platform(3) User Interface(338) Video Tutorial(37) Web 2.0(100) Web App Generator(101) Web Application Generator(607) Web Form Builder(40) Web.Config(9) Workflow(28)
Archive
Blog
Thursday, June 19, 2025PrintSubscribe
Beyond CRUD: Tailoring Your App with Custom Actions

Automatically generated apps are a fantastic starting point. With a few clicks, you have a powerful, professional-looking application with robust capabilities for creating, reading, updating, and deleting records (CRUD). But real-world business requirements are rarely that simple.

What happens when your users need to do more than just edit a product? What if they need to trigger a specific business process, like marking a product as discontinued, changing its supplier based on complex rules, or applying a batch update to dozens of records at once? This is where a standard CRUD interface reaches its limit, and the true power of your application platform needs to shine.

From Simple Clicks to Smart Operations

In Code On Time, the answer lies in a powerful, decoupled system of Actions and Business Rules. Think of it this way:

  • An Action is the user-facing component—a button in a form or an option in a context menu that a user can click. You define what it looks like, where it appears, and what it's called.
  • A Business Rule is the server-side logic that executes when the Action is triggered. This is where you define what actually happens.

This separation is key. You can have multiple actions in different parts of the UI trigger the same underlying business rule, ensuring consistency and reducing code duplication.

For example, a "Mark as Discontinued" option can be added to a row's context menu with just a few property settings.

image1.png

Clicking the 'More' icon next to the first column displays the row's context menu, which is populated with actions defined in the 'Grid' scope group. The tooltip that appears on hover, "Remove product from the catalog," is pulled directly from the action's Description property, demonstrating how configuration directly maps to the user experience.

And you can easily add a confirmation dialog to prevent accidental clicks, providing a crucial safeguard for important operations.

image3.png

A simple modal confirmation dialog appears when the action is invoked, serving as a crucial safeguard against accidental operations. This dialog, generated from the action's Confirmation / Text property, is intuitive for the end-user, who can dismiss it with the 'Esc' key or confirm it with the 'Enter' key.

Collecting User Input for Complex Tasks

Some business processes require more information. Replacing a product's supplier isn't a simple "yes/no" decision. You need to know which new supplier to choose.

This is where you can leverage a "Confirmation Controller"—a dedicated form designed to collect additional parameters from the user before an action is executed. This technique allows you to create complex, multi-step operations that feel seamless to the end-user.

image2.png

The view1 form of the Products_ChangeSupplier is shown when the user is selecting a new supplier for the product. The form is displayed when app users initiate the changesSupplier action in the `Products controller. This modal form acts as a temporary data collection tool. This powerful technique allows for the creation of complex, multi-step operations that require additional user input without cluttering the primary interface.

Bringing Intelligence to the Front-End, with SQL

The most innovative part of this system is how you can control the entire client-server interaction without leaving the comfort of a familiar language like T-SQL. The business rules you write on the server can intelligently direct the user interface on the client.

Imagine the "Change Supplier" action requires that the new supplier must already provide other products in the same category. You can write a simple SQL business rule to validate this logic. If the user selects an invalid supplier, the rule can instruct the front-end to:

  1. Stop the action from proceeding.
  2. Set the focus directly on the invalid input field.
  3. Display a precise error message right where the user needs to see it.
image4.png

This targeted error message showcases intelligent server-client communication. Instead of returning a generic error, the server-side business rule uses the @Result_Focus parameter to instruct the client-side UI to focus on the specific field that failed validation and display a helpful message directly next to it. Use a comma to separate the field name from the message. The front end will automatically activate the tabbed category or category associated with another wizard step if the field input is not visible at the moment.

This entire sophisticated, client-side interaction is commanded by your server-side SQL script. You don't write a single line of JavaScript to make it happen. The framework handles the complex plumbing, allowing you to focus purely on the business logic.

Ready to Build Your Own?

From simple confirmations to multi-step, validated batch operations, Custom Actions provide the flexibility to mold your application to fit any business need. This high-level overview just scratches the surface of what's possible.

To learn how to implement these features step-by-step, from creating your first action to programming conditional validation logic, dive into our comprehensive tutorial.
Read the Full Tutorial: Custom Actions
Tuesday, May 20, 2025PrintSubscribe
Clear Choices, Clean Data

In the world of data-centric applications, clear data input and representation are key to a smooth user experience. Often, fields that store numeric or coded values, while efficient for databases, can be a source of confusion for end-users, leading to potential data entry errors. If you've ever had users puzzled by what a specific number or code means in a form, this is for you.

This document explores how Static Pick Lists in Code On Time applications can transform these challenging fields into user-friendly controls. Imagine turning a simple numeric input into an intuitive Drop Down List or Radio Button List. For instance, the Products.ReorderLevel field in the Northwind database, which contains discrete numbers, can be enhanced to show descriptive text labels.

The Static Pick List Solution

Code On Time enables developers to define a list of value-text pairs directly in the application's metadata for a specific field. The application will store the actual data value in the database, but users will interact with meaningful, descriptive text. This approach neatly separates the user interface from the stored data format, which is especially useful for values that rarely change.

You can manage these configurations within the "Pick List" group of properties for a field in the App Studio. For the Products.ReorderLevel field, instead of users typing numbers like 0, 5, or 10, they can select "Zero," "Five," or "Ten" from a list you've defined. This not only looks cleaner but also significantly reduces the possibility of data input errors. These helpful text representations will also appear in filters and search screens, making data interaction consistent and clear throughout the application.

Enhancing Boolean Fields Too

The power of Static Pick Lists isn't limited to numeric fields. Boolean fields, often represented as simple checkboxes, can also be made much more descriptive.

Take the Products.Discontinued field from Northwind, for example. While a checkbox is functional, you can provide users with clearer options. By configuring a static pick list, you could relabel this field as "Inventory Status" and offer choices like "Available" (representing the false value) and "Discontinued" (representing the true value). This makes the field's purpose immediately obvious.

image2.png
The user-friendly Discontinued and Available options of the Inventory Status provide a user-friendly interface for the Products.Discontinued flag.

Why Implement This?

  • Improved Data Integrity: Clear choices lead to fewer input mistakes.
  • Better User Experience: Users face less confusion and can interpret data more easily.
  • No Database Schema Changes: Enhance usability without altering your underlying database structure.

How It's Done (A Glimpse)

Setting this up involves a few straightforward steps in the App Studio. After selecting your field, you'll work with its "Pick List" properties. You'll set the "Input Style" to your preferred control, like Drop Down List. If the field isn't already set up for list items, an action like "Convert to Static Pick List" can get you started. Then, you define each static item by providing its actual Value (what's stored in the database) and the Text (what the user sees).

image1.png
The custom configuration of the Discontinued field is shown in the App Explorer panel overlaying the live application. The inspection frame is placed over the field value in response to the selection of the corresponding field.

Ready to Improve Your App's Clarity?

If you're looking to make your Code On Time applications more intuitive and reduce data entry errors, implementing Static Pick Lists is a fantastic step. For a comprehensive guide on how to configure these for both numeric and boolean fields, including detailed steps and more examples, please refer to our documentation.

Dive into the full details here: Enhancing Data Input and Representation with Static Pick Lists and start building more user-friendly applications today!
Thursday, May 8, 2025PrintSubscribe
Stop Coding, Start Securing: Visually Configure Row-Level Security in Minutes!

Application security, especially controlling who sees what data, is often a complex and time-consuming task. Developers traditionally wade through lines of code or repetitive configurations to implement row-level security, making it prone to errors and difficult to audit. What if you could define and test these critical data access rules visually, getting instant feedback and ensuring your application is locked down precisely as intended, all without writing a single line of server-side code for most common scenarios?

Introducing Static Access Control Rules (SACR) in Code On Time, now supercharged by the integrated App Studio 2025. We've taken the power of declarative, SQL-based security and paired it with an intuitive visual interface. Imagine defining rules like "users only see their own orders" or "managers in the Sales department can only see customers in their region" through a simple point-and-click configuration, directly within your live application preview. No more hunting through business rule files or worrying if your custom code covers every edge case for standard security patterns!

With App Studio, configuring SACR becomes a breeze. See at a glance which parts of your application are protected with clear visual cues like the "security shield" icon directly in the App Explorer. Define rules using straightforward properties, get instant feedback on their impact, and even use the "Related Items" feature to see exactly which data fields and views are affected by a specific rule. Debugging is simplified to toggling a rule's Enabled status and observing the change immediately. This visual approach not only accelerates development but also makes your security posture transparent and significantly easier to maintain.

Ready to transform how you handle data security? Stop wrestling with complex code for common security needs and embrace the power of visual configuration. Learn how to master Static Access Control Rules with our comprehensive tutorial and start building more secure applications, faster.

Click here to learn how to master Static Access Control Rules with our comprehensive tutorial.
image2.png
This access control rule is triggered by the presence of the LastName data field in the view. The framework will filter in the rows that have the trigger field value that matches the user’s name. The rule applies to the views of all existing and future data controllers of the application.
image1.png
The maroon “security shield” icon is overlaid on the relevant configuration nodes of Customers, Employees, and Orders data controllers. The icon subtly hints of the security restrictions in the application making it possible at-a-glance security check. The Access Control property group of the affected nodes contains the Triggers property with the list of relevant “trigger” fields defined in SACR.