Google app maker 如何查找字段';a'的s类型信息;记录';在服务器脚本中的appmaker中?

Google app maker 如何查找字段';a'的s类型信息;记录';在服务器脚本中的appmaker中?,google-app-maker,Google App Maker,我正在尝试创建一个可重用的脚本,用于通过服务器端脚本在存储上捕获记录更改。为此,我需要给定表的模型信息,包括每个字段的类型 我已经找到了如何获取表的模型和字段的详细信息: 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(my

我正在尝试创建一个可重用的脚本,用于通过服务器端脚本在存储上捕获记录更改。为此,我需要给定表的模型信息,包括每个字段的类型

我已经找到了如何获取表的模型和字段的详细信息:

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”在这里看起来像一个空属性,我似乎不知道如何获取它的任何引用来告诉我需要什么


如何获取模型中给定字段的可用类型信息?

目前,App Maker不公开API来访问模型元数据。 您的代码片段实际上正在访问AppMaker的内部状态,并且可能在将来的版本中中断(JS编译器实际上对“L”属性进行了模糊处理,而不是设计为从用户端访问)


我们知道这种元编程很方便,这是我们将来可能根据用户反馈添加的内容。请随时在我们的问题跟踪器()中提交请求功能。

感谢您的回复。我已将请求添加到问题跟踪程序中。