私はサーバーサイドスクリプトを使ってonSaveレコードの変更をキャプチャするための再利用可能なスクリプトを作成しようとしています。そのためには、各フィールドのタイプを含む、特定のテーブルのモデル情報が必要です。サーバスクリプトのappmakerでフィールドのタイプ情報を 'レコード'にするにはどうすればよいですか?
私は私のテーブルとフィールドの詳細については、モデルを取得する方法を考え出した:
var table = "Clients";
var myObject = app.models[table];
// Dump the properties of the 2nd field in the model
console.log("Field 2 properties: " + JSON.stringify(myObject["L"]["fields"]["1"]));
私はこれを参照してください。
{"name":"Client",
"key":"zzzkS1spSPKkRXMn",
"displayName":null,
"description":"Short name for client (must be unique)",
"type":{},
"required":false,
"uid":false,
"defaultValue":null,
"minLength":0,
"maxLength":null,
"integer":false,
"sortable":true,
"minValue":null,
"maxValue":null,
"regexp":null,
"regexpError":null,
"possibleValues":null,
"aggregationType":null
}
「type」は、ここで空のプロパティのように見え、私は必要なものを教えてくれるように言及する方法を理解できないようです。
モデルの特定のフィールドに使用可能なタイプ情報を取得するにはどうすればよいですか?
ありがとうございます。リクエストトラッカーにリクエストを追加しました。 –