User Manual

06.26.2025

MANUAL

Developer Function: Server Script: Function

## Overview This function automatically converts code written in "[Server Script](/en/manual/table-management-server-script)" into an anonymous function. By converting it into an anonymous function, you can interrupt the server script at the point where you write "return;" in the code. ## Limitation 1. If "[TryCatch](/en/manual/server-script-try-catch)" and "Make it a function" are checked at the same time, it will be converted into an anonymous function and then converted into a try-catch statement. 2. If you write "return;" with "Make it a function" unchecked, an application error will occur. (The error is SyntaxError: Illegal return statement) ## Example ### Settings ##### JavaScript ``` // Preceding process context.Log('Preceding process'); // Check if number A and number B are larger or smaller if (model.NumA > model.NumB) { context.Log('Enter a value for number B that is larger than number A.'); return; } // Subsequent process context.Log('Subsequent process'); ``` ### Execution result #### When numA: 10 and numB: 100 ![image](https://pleasanter.org/binaries/7183755d76254602bee7d8aaa42b322e) #### When numA: 101 and numB: 100 ![image](https://pleasanter.org/binaries/0115cceb70d3471bbbefbb227eff1142) ## Supported Versions |Supported versions|Body| |:--|:--| |1.4.12.0 and later|Added function| ## Related Information <div id="ManualList"><ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article> <ul><li><a href="/en/manual/server-script-try-catch">Developer Function: Server Script: TryCatch</a><span>06.26.2025 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.