简体   繁体   English

appmaker不匹配错误,我该如何解决?

[英]appmaker mismatch error, how do i resolve?

I have an error and i cant seem to resolve it: 我有一个错误,我似乎无法解决它:

Type mismatch: element at [0] should be string, but was: undefined Error: 
Type mismatch: element at [0] should be string, but was: undefined at 
datasources.SitesByld.script:1

Executing query for datasource SitesByld: (Error) : Type mismatch: element 
at [0] should be string, but was: undefined
at datasources.SitesByld.script:1
at Object.success (AppStart:11:14)

Executing query for datasource SitesByld failed.


var record = 
app.models.Sites.getRecord(query.parameters.SitesId);
if (record !== null) {
return [record];
}
return [];

I am fairly new to coding so forgive me if this is simple 我是编码的新手,如果这很简单,请原谅我

At the end of your code, you have a if clause but there is no else clause? 在代码的末尾,您有一个if子句,但没有else子句? It seems like the function will always return an empty array. 似乎该函数将始终返回一个空数组。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决阻止来自我的 Google Apps 脚本的 AJAX 请求资源的“MIME 类型不匹配错误”? - How do I resolve a 'MIME type mismatch error' blocking an AJAX-requested resource from my Google Apps Script? 如何解决“未定义” JavaScript错误? - How do I resolve JavaScript error “not defined”? 如何解决错误“代码”:postgresql 中的“22001” - How do I resolve the error "code": "22001" in postgresql 升级 vuejs 应用程序时如何解决此错误? - How do I resolve this error when upgrading a vuejs app? 如何解决 fetch 或 401 上的 cors 错误? - How do I resolve a cors error on a fetch or 401? 如何使用javascript中的regexp解决“无效量词”错误? - How do I resolve an “invalid quantifier” error with regexp in javascript? 如何解决“在 PATH 错误中找不到运行时‘节点’” - How do I resolve “Cannot find runtime 'node' on PATH error” 如何解决 Nuxt 中的 Cannot stringify a function 错误? - How do I resolve Cannot stringify a function error in Nuxt? 我如何在解决多个承诺时解决它们? - How do I resolve multiple promises as they resolve? 我如何解决此错误“语法错误:JSON中位置0上的意外令牌&lt;” - How do i resolve this error “ SyntaxError: Unexpected token < in JSON at position 0”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM