クライアントスクリプトの文字列値に基づいて選択肢フィールドを設定する方法Summary文字列フィールドに基づいて選択フィールドの値を設定したい場合(例:簡単な説明) 以下のクライアントスクリプトを使用すると便利です onLoad クライアントスクリプトInstructions 以下の例では、[簡単な説明(short_description)] フィールドの特定の文字列に基づいて、フォームのロード時に [緊急度(urgency)] フィールドと [影響度(impact)] フィールドが設定されています。 function onLoad() { var desc = g_form.getValue('short_description'); desc = desc.toLowerCase(); // alert(desc); if (desc.indexOf('critical') >= 0) { g_form.setValue('impact', '1'); g_form.setValue('urgency', '1'); } else if (desc.indexOf('major') >= 0) { g_form.setValue('impact', '2'); g_form.setValue('urgency', '2'); } else if (desc.indexOf('minor') >= 0) { g_form.setValue('impact', '3'); g_form.setValue('urgency', '3'); } else if (desc.indexOf('warning') >= 0) { g_form.setValue('impact', '4'); g_form.setValue('urgency', '4'); }}