User Manual

10.04.2024

MANUAL

Developer Function: Server Script: items.Get

## Overview This is the "Get Method" of the "[Items Object](/en/manual/server-script-items)". It gets information about the specified record or records in the specified table. If the table has "[Site Integration](/en/manual/table-site-integration)" set, it also gets information about each integrated record. ## Limitations 1. The maximum number of records that can be retrieved is the PageSize (default 200) in Api.json. If you want to retrieve more than 200 records, please refer to "[FAQ: I want to retrieve data exceeding 200 records via API](/en/manual/faq-api-paging)". ## Syntax ``` items.Get(id, data) ``` ## Parameters |Parameter|Type|Required|Description| |:----------|:----------|:---:|:---------------------------| |id|object|Yes|Specify the site ID and record ID| |data|string|No|Specify the filter and sort of the records to be selected in JSON format| ## Return Value Return an array of "apiModel" for the corresponding records. ## Usage Example 1 The following example retrieves the record with record ID 123. ##### JavaScript ``` let result = items.Get(123); ``` ## Usage Example 2 The following example gets and logs information on records with a Status of 900 (completed) registered in a recorded table with a site ID of 2. ##### JavaScript ``` let data = { "View": { "ColumnFilterHash": { "Status": "[\"900\"]" } } }; let results = items.Get(2, JSON.stringify(data)); for (let item of results) { context.Log(`${item.ResultId} ${item.Title} ${item.ClassA} ${item.NumB}`); } ``` ## Notes This is a method used in "[Server Script](/en/manual/table-management-server-script)". It cannot be used in "[Script](/en/manual/table-management-script)". ## Related Information ・[Manage Table: Server script](/manual/table-management-server-script) ・[Execution Timing for Each Object](/manual/server-script-conditions) ・[Items Object](/manual/server-script-items)
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.