---
sourceDocument: Xanadu API リファレンス
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu API リファレンス

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# FieldWriteOptions 構造体 - Android

# FieldWriteOptions 構造体 - Android {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：2分

FieldWriteOptions クラスは、ServiceNow インスタンス上のレコードのフィールドを更新または作成するためのオプションを設定する関数を提供します。
{#FieldWriteOptionsAndroidAPI__table_vx2_klw_5pb__entry__3}

| 名前 | タイプ | Description (説明) |
|-|-|-|
| クエリアイテム | [マップ](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/)\<文字列、文字列\> | 書き込みオプションを表す要求クエリアイテムのコレクション。 |
[表 : 1. プロパティ]

{#FieldWriteOptionsAndroidAPI__table_vx2_klw_5pb}

## FieldWriteOptions - FieldWriteOptions(vararg options: FieldWriteOptions.Options) {#ariaid-title2}

ServiceNowインスタンスのレコードにフィールドを書き込んだり作成したりするためのオプションを設定します。
{#FldWriteOpt-FieldWriteOptions_O__table_xth_4vs_4pb__entry__3}

| 名前 | タイプ | Description (説明) |
|-|-|-|
| vararg オプション | FieldWriteOptions.Options | フィールドの作成時または書き込み時に設定するオプション。 有効な値： * TREAT_INPUT_VALUES_AS_DISPLAY_VALUES:指定したフィールド値を表示値として保存する必要があります。この値が `true` に設定されていない場合、渡された値は実際のフィールド値と見なされます。 * SUPPRESS_AUTO_SYS_FIELD:システムフィールドの自動生成を抑制します。 |
[表 : 2. パラメーター]

{#FldWriteOpt-FieldWriteOptions_O__table_xth_4vs_4pb}  
次のコード例は、この関数を呼び出す方法を示しています。

    // Update assigned_to field using actual value (syd_id of user)
    val response = runCatching {
        getNowTableService()?.updateRecord("sys_id_of_record", "sn_customerservice_case", mapOf("assigned_to" to "<sys_id_of_user>"))?.execute()
    }

    // Update assigned_to field using display value
    val fieldWriteOptions = FieldWriteOptions(FieldWriteOptions.Options.TREAT_INPUT_VALUES_AS_DISPLAY_VALUES)
    val response = runCatching {
        getNowTableService()?.updateRecord("sys_id_of_user", "sn_customerservice_case", mapOf("assigned_to" to "John Doe"))?.execute()
    }


