User Manual

10.31.2024

MANUAL

FAQ: How to decorate the text of items that match a condition in an Index

Answer

Please use "「Server Script」" and "「Style」".


Overview

This is a sample code that decorates the text color of the date (DateA) in the "「Index」" of Pleasanter if the date (DateA) is within one month (including the past). The text-decoration is specified in "「Style」".

Operation Image

image

Operation Procedure

  1. Create a table
  2. Create a new "「Server Script」" and write the following script. Check "Before row display" as the condition and update.
  3. Create a new "「Style」" and write the following code. Check "「Index」" as the output destination and update.
  4. From the "「Editor」", activate DateA according to the sample code below.
  5. Open a new record from the "Create New" button and enter today's date in DateA to create a record.
  6. Return to the "「Index」" and confirm that DateA is displayed in red.

Sample Code

JavaScript
let now = new Date()
let limit = now.setMonth(now.getMonth() + 1);
if (model.DateA <= limit) {
   columns.DateA.ExtendedCellCss = 'alert-color';
}
CSS
.alert-color {
   color: red;
   font-weight: bold;
}
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.