SQL Customization Script – OnGridColumnValueChanged Event – E Stream MSC

SQL Customization Script – OnGridColumnValueChanged Event

In this step by step tutorial for beginner, weโ€™ll guide you through the process of using the OnGridColumnValueChanged event to tailor calculations for your business operations. This event is particularly useful in scenarios like a Sales Module, where you need to automate the calculation of amounts based on your business-specific requirements.

๐–๐ก๐š๐ญ ๐ข๐ฌ ๐ญ๐ก๐ž ๐Ž๐ง๐†๐ซ๐ข๐๐‚๐จ๐ฅ๐ฎ๐ฆ๐ง๐•๐š๐ฅ๐ฎ๐ž๐‚๐ก๐š๐ง๐ ๐ž๐ ๐„๐ฏ๐ž๐ง๐ญ?
๐ŸŒŸ OnGridColumnValueChanged event triggers the script whenever a value of a cell or column in a grid (such as a data grid or table) is changed.

๐“๐ฎ๐ญ๐จ๐ซ๐ข๐š๐ฅ ๐Ž๐›๐ฃ๐ž๐œ๐ญ๐ข๐ฏ๐ž
๐ŸŒŸ We will show you how to write a DIY Script using the OnGridColumnValueChange event for travel agency business, such that it can be used to auto calculate the amount charges for hotel room.

๐…๐จ๐ซ๐ฆ๐ฎ๐ฅ๐š ๐Ÿ๐จ๐ซ ๐’๐ฎ๐›๐ญ๐จ๐ญ๐š๐ฅ ๐‚๐š๐ฅ๐œ๐ฎ๐ฅ๐š๐ญ๐ข๐จ๐ง
๐ŸŒŸ The formula for the Sub Total Amount is =(Room Rate Per Night)ร—(Number of Nights)ร—(Number of Rooms) – Discount

๐‘๐ž๐ฌ๐ฎ๐ฅ๐ญ
๐ŸŒŸ The result of this script would achieve is whenever the user changed the value in the fields of Qty, Price, Night, and Discount, the amount will follow the formula and change accordingly.

๐“๐ข๐ฆ๐ž ๐’๐ญ๐š๐ฆ๐ฉ๐ฌ
00:0000:45 Introduction
00:4601:42 Create DIY Field
01:4302:11 Why need to create DIY Fields
02:1204:43 Function and Procedure
04:4405:09 SameText Procedure and Editing Field
05:1005:50 Field Name and Data Type
05:5106:26 Main Function
06:2707:18 Compile Script
07:1907:32 Show Message Procedure
07:3307:42 Ending Demo

STEP 1: Scan QR Code to pay

SQL

STEP 2: Click here to email payment info

Overview