User Manual

10.04.2024

MANUAL

Developer Function: Server Script: view.AddColumnPlaceholder

## Overview This is the "AddColumn Placeholder Method" of the "view object". It is used to specify a dynamic "[Column Name](/en/manual/dev-column-name)" in the placeholder of "[OnSelectingWhere](/en/manual/faq-extended-sql-selecting-where)" in "「Extended SQL」" in "[Server Script](/en/manual/table-management-server-script)". ## Supported Versions 1. Pleasanter 1.2.2.0 or later 1. Pleasanter .NET Framework version 0.50.265.0 or later ## Limitations 1. No string other than the "[Column Name](/en/manual/dev-column-name)" may be specified. ## Syntax ``` view.AddColumnPlaceholder(placeholder, columnName); ``` ## Parameter |No|Parameter|Type|Required|Overview| |:--|:----------|:----------|:---:|:---------------------------| |1|placeholder|string|Yes|Placeholder| |2|columnName|string|Yes|"[Column Name](/en/manual/dev-column-name)" | ## Return Value There is no return value. ## Usage Example In the following example, the "「Extended SQL」" where Name is SelectingWhereName is applied to users other than user ID 3. In addition, the placeholder string {{DynamicColumn}} in the SQL is replaced with ClassA before execution. ##### Extended SQL ``` { "Name": "SelectingWhereName", "SpecifyByName": true, "OnSelectingWhere": true, "CommandText": "(\"Results\".\"Status\"=900 and \"Results\".\"ClassB\"={{DynamicColumn}})" } ``` ##### JavaScript ``` if (context.UserId !== 3) { view.OnSelectingWhere = 'SelectingWhereName'; view.AddColumnPlaceholder('DynamicColumn', 'ClassA'); } ``` ## 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/dev-column-name">Correspondence of Column name and Name in the system in the Database</a><span>10.04.2024 up</span></li></ul></article> <ul><li><a href="/en/manual/faq-extended-sql-selecting-where">FAQ: How can I sort the records displayed by department?</a><span>08.14.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.