0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【ServiceNow】選択肢がバグったら

Posted at

バージョンはVancouverです。

問題概要

選択肢がバグる。一番下は作成していない選択肢です。
image.png

問題の再現

従業員テーブルに「職務カテゴリー」項目を新設、サンプルの選択肢を3つ作ります。
image.png
フォーム画面で確認(英語)
image.png
フォーム画面で確認(日本語)
image.png
「カスタマーエクスペリエンスと顧客関係管理」を選択して更新します。
image.png
更新したレコードを確認します。あれ?
image.png

原因

選択肢の値の最大長は40です。
参考:選択肢リストの定義を表示する
辞書エントリに選択肢は増えていませんが、フォーム画面上で見ると選択肢の最大長40を超える選択肢の物理名が勝手に追加されているように見えます。
またよく見ると不自然なところで途切れています。数えてみるとちょうど40です。

customer experience and relationship man

選択肢を作成するときエラーは出ないので余計に分かりにくい。

対応:選択肢の長さを40におさめる

最大長は40と決まっているので40におさまるように選択肢を作成し直しました。
image.png
フォーム画面で確認。
レコードを更新してもバグは起きません。
image.png

余談

こちらは業務で実際に起きたバグです。
環境壊したかもと大変焦りました。
選択肢で日本語が40を超えることは滅多に無いと思いますが、英語に訳したとき長さが40を超えてしまうというのはあり得るかもしれません。
英語に訳したときの最大長にも注意が必要です。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?