[英]Function not running fully before next execution starts in google apps script
I have 3 functions I want to run one after the other.我有 3 个功能要一个接一个地运行。 For some reason, my first function doesn't fully run when my code is as follows:由于某种原因,当我的代码如下时,我的第一个 function 没有完全运行:
function main_url_generator_(){
create_owner_links_list();
delete_all_filter_views();
create_filter_view_w_url();
};
When I separate them into 2 functions it works fine:当我将它们分成 2 个函数时,它工作正常:
function main_url_generator_1(){
create_owner_links_list();
};
function main_url_generator_2(){
delete_all_filter_views();
create_filter_view_w_url();
};
How can I combine all 3 functions and ensure the first function( create_owner_links_list()
) has fully run before it goes through the rest of the functions.如何组合所有 3 个函数并确保第一个函数( create_owner_links_list()
)在通过函数的 rest 之前已完全运行。 Please help请帮忙
With the help of comments(Thanks all), I modified my function as follows and it works great:在评论的帮助下(谢谢大家),我修改了我的 function 如下,效果很好:
function main_url_generator(){
create_owner_links_list();
//Added the SpreadsheetApp.flush function
SpreadsheetApp.flush();
delete_all_filter_views();
create_filter_view_w_url();
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.