カラムの自動拡張について

Kanami Murata
Tera Contributor

KB1587153 ←こちらに

=======================================

Now Platform では、最大長は強制されません。

ServiceNow のフィールドは、sys_dictionary max_length 値より長い文字列入力を受け付けます。

=======================================
と記載がありますが、文字列フィールドの max_length 値がvarcharの場合でも同じ仕様だと思っているのですが、

画面からの入力や、RESTインタフェースでの更新でmax_length 値より長い文字列を受け付けません。。

特に更新時にスクリプト等で制限をつけてはいないのですが、原因お分かりになる方はいらっしゃいますでしょうか。

1 ACCEPTED SOLUTION

@Kanami Murata 

if you want to accept more than 100 then use 255 as length in dictionary

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Kanami Murata 

this is the expected behavior of platform.

What's your question and business requirement?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

質問とビジネス要件について回答します。

質問は、KB1587153に記載されている内容と実際の挙動がマッチしないため、理由が知りたい。

です。KB1587153には

=======================================

max_length値より長い文字列を受け付けます。

=======================================

と記載されていますが、現在の実装ではvarchar(100)の場合は101文字を受け付けません。

どちらが正しいのかが知りたいです。

※ビジネス要件を決めるための質問になります。

@Kanami Murata 

so you are trying to create string field for 101 length?

If yes then is it converting to 255?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Under normal circumstances, it will be set as varchar(100) since it is less than 100 characters, but I would like it to be able to accept strings longer than 101 characters in case of emergencies.

varchar(100).
max_length=100.

======================
If yes then is it converting to 255?

======================
Is this regarding the varchar setting? Is it about max_length?