LoginSignup
0
0

More than 3 years have passed since last update.

IMのドキュメント内にある様々なAPIをまとめてみる その3

Last updated at Posted at 2020-07-01

IM開発備忘録

IMのドキュメント内にある様々なAPIをまとめてみる

Formaのアイテムからアイテムへデータを渡すクライアントサイドAPI

まずは取得から

ツールアイテム API
文字列 formaItems.product_72_textbox.getItemData.%フィールド識別ID%
複数行文字列 formaItems.product_72_textarea.getItemData.%フィールド識別ID%
数値 formaItems.product_72_number.getItemData.%フィールド識別ID%
日付 formaItems.product_72_calendar.getItemData.%フィールド識別ID%
期間 formaItems.product_72_terms.getItemData.%フィールド識別ID%
一覧選択 formaItems.product_80_itemSelect.getItemData.%フィールド識別ID%
明細テーブル formaItems.product_80_table.getItemData.%テーブル識別ID%
チェックボックス formaItems.product_80_checkbox.getItemData.%フィールド識別ID%
ラジオボタン formaItems.product_80_radio.getItemData.%フィールド識別ID%
セレクトボックス formaItems.product_80_selectbox.getItemData.%フィールド識別ID%
リストボックス formaItems.product_80_listbox.getItemData.%フィールド識別ID%
グリッドテーブル formaItems.product_80_gridtable.getItemData.%テーブル識別ID%
ユーザ選択 formaItems.product_72_userSelect.getItemData.%フィールド識別ID%
組織選択(会社コード) formaItems.product_72_departmentSelect.getItemData.%フィールド識別ID%_c
    (組織セットコード) formaItems.product_72_departmentSelect.getItemData.%フィールド識別ID%_s
    (組織コード) formaItems.product_72_departmentSelect.getItemData.%フィールド識別ID%
組織・役職選択(会社コード) formaItems.product_72_departmentPostSelect.getItemData.%フィールド識別ID%_c
       (組織セットコード) formaItems.product_72_departmentPostSelect.getItemData.%フィールド識別ID%_s
       (組織コード) formaItems.product_72_departmentPostSelect.getItemData.%フィールド識別ID%_d
       (役職コード) formaItems.product_72_departmentPostSelect.getItemData.%フィールド識別ID%
所属組織選択(会社コード) formaItems.product_72_affiliationSelect.getItemData.%フィールド識別ID%_c
      (組織セットコード) formaItems.product_72_affiliationSelect.getItemData.%フィールド識別ID%_s
      (組織コード) formaItems.product_72_affiliationSelect.getItemData.%フィールド識別ID%
隠しパラメータ formaItems.product_72_hidden.getItemData.%フィールド識別ID%
一覧選択(互換用) formaItems.product_72_itemSelect.getItemData.%フィールド識別ID%
明細テーブル(互換用) formaItems.product_72_table.getItemData.%テーブル識別ID%
チェックボックス(互換用) formaItems.product_72_checkbox.getItemData.%フィールド識別ID%
ラジオボタン(互換用) formaItems.product_72_radio.getItemData.%フィールド識別ID%
セレクトボックス(互換用) formaItems.product_72_selectbox.getItemData.%フィールド識別ID%
リストボックス(互換用) formaItems.product_72_listbox.getItemData.%フィールド識別ID%
スプレッドシート formaItems.product_80_spreadsheet.getItemData.%スプレッドシートID%

取得方法はこんな感じ(カスタムスクリプト内)

sample.js
var result = formaItems.product_72_textbox.getItemData.%フィールド識別ID%();

これで変数「result」に値が入る。

つづいて反映

ツールアイテム API
文字列 formaItems.product_72_textbox.setItemData.%フィールド識別ID%(Object arg)
複数行文字列 formaItems.product_72_textarea.setItemData.%フィールド識別ID%(Object arg)
数値 formaItems.product_72_number.setItemData.%フィールド識別ID%(Object arg)
日付 formaItems.product_72_calendar.setItemData.%フィールド識別ID%(Object arg)
期間 formaItems.product_72_terms.setItemData.%フィールド識別ID%(Object arg)
一覧選択 formaItems.product_80_itemSelect.setItemData.%フィールド識別ID%(Object arg)
明細テーブル formaItems.product_80_table.setItemData.%テーブル識別ID%(Object arg)
チェックボックス formaItems.product_80_checkbox.setItemData.%フィールド識別ID%(Object arg)
ラジオボタン formaItems.product_80_radio.setItemData.%フィールド識別ID%(Object arg)
セレクトボックス formaItems.product_80_selectbox.setItemData.%フィールド識別ID%(Object arg)
リストボックス formaItems.product_80_listbox.setItemData.%フィールド識別ID%(Object arg)
グリッドテーブル formaItems.product_80_gridtable.setItemData.%テーブル識別ID%(Object arg)
ユーザ選択 formaItems.product_72_userSelect.setItemData.%フィールド識別ID%(Object arg)
組織選択(会社コード) formaItems.product_72_departmentSelect.setItemData.%フィールド識別ID%_c(Object arg)
    (組織セットコード) formaItems.product_72_departmentSelect.setItemData.%フィールド識別ID%_s(Object arg)
    (組織コード) formaItems.product_72_departmentSelect.setItemData.%フィールド識別ID%(Object arg)
組織・役職選択(会社コード) formaItems.product_72_departmentPostSelect.setItemData.%フィールド識別ID%_c(Object arg)
       (組織セットコード) formaItems.product_72_departmentPostSelect.setItemData.%フィールド識別ID%_s(Object arg)
       (組織コード) formaItems.product_72_departmentPostSelect.setItemData.%フィールド識別ID%_d(Object arg)
       (役職コード) formaItems.product_72_departmentPostSelect.setItemData.%フィールド識別ID%(Object arg)
所属組織選択(会社コード) formaItems.product_72_affiliationSelect.setItemData.%フィールド識別ID%_c(Object arg)
      (組織セットコード) formaItems.product_72_affiliationSelect.setItemData.%フィールド識別ID%_s(Object arg)
      (組織コード) formaItems.product_72_affiliationSelect.setItemData.%フィールド識別ID%(Object arg)
隠しパラメータ formaItems.product_72_hidden.setItemData.%フィールド識別ID%(Object arg)
一覧選択(互換用) formaItems.product_72_itemSelect.setItemData.%フィールド識別ID%(Object arg)
明細テーブル(互換用) formaItems.product_72_table.setItemData.%テーブル識別ID%(Object arg)
チェックボックス(互換用) formaItems.product_72_checkbox.setItemData.%フィールド識別ID%(Object arg)
ラジオボタン(互換用) formaItems.product_72_radio.setItemData.%フィールド識別ID%(Object arg)
セレクトボックス(互換用) formaItems.product_72_selectbox.setItemData.%フィールド識別ID%(Object arg)
リストボックス(互換用) formaItems.product_72_listbox.setItemData.%フィールド識別ID%(Object arg)
スプレッドシート formaItems.product_80_spreadsheet.setItemData.%スプレッドシートID%(Object arg)

使い方はこんな感じ

sample.js
var args = {};
    args.data = {};
    args.data.%フィールド識別ID% = "入力値";
    formaItems.product_72_textbox.setItemData.%フィールド識別ID%(args);

例としてテキストボックスの取得と反映を載せたが
全て上げるときりがないので、↓からほかのアイテムの扱いの詳細があるので一読する価値あり
https://www.intra-mart.jp/document/library/bis/public/bis_specification/texts/spec/csjs_script.html

他の記事

IMのドキュメント内にある様々なAPIをまとめてみる その1
https://qiita.com/ChrisKasahara/items/c3187249112e7114aa12

IMのドキュメント内にある様々なAPIをまとめてみる その2
https://qiita.com/ChrisKasahara/items/ac038ce0b704574ada16

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0