如何在Google App Maker中覆盖或清除驱动器表中的数据 [英] How to overwrite or clear data in a Drive Table in Google App Maker

查看:89
本文介绍了如何在Google App Maker中覆盖或清除驱动器表中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Google表格中的数据加载到App Maker数据源中.现在,我对原始工作表进行了更改,想要导入新数据并覆盖旧数据,或者只是清除现有数据并从工作表中导入新数据.在文档中,我看不到任何一种方法.

I have loaded data from a Google Sheet into an App Maker datasource. Now I have made a change to the original sheet and want to import the new data and overwrite the old or alternatively just clear the existing data and import the new data from the sheet. I don't see a way to do either in the docs.

推荐答案

我在需要时使用以下命令清除驱动器表:

I use the following command to clear a drivetable when needed:

app.datasources.DatasourceName.unload();

这将清除客户端上的表.要删除驱动器表中的所有记录,请使用以下服务器脚本:

This will clear the table on the client. To delete all Records in a drive table use the following server script:

var records = app.models.ModelName.newQuery().run();
app.deleteRecords(records);

这篇关于如何在Google App Maker中覆盖或清除驱动器表中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆