字段动作 - 更新时

 字段动作 - 更新时

如果您想在修改字段的值时执行动作,您可以为该字段编写更新时脚本。“更新时”脚本在更改数据库中保存的数据之后执行。 

如果字段使用视图中自定义动作来更新,不会调用更新时脚本

 语法

on update
{
// 指定要执行的 deluge 代码

}

 示例

让我们以反馈应用程序表单做例子。在下面的示例中,每当反馈的状态更新为 Closed 时,将向报告它的人发送邮件。

if (input.Status == "Closed")
{
sendmail
(
From : zoho.adminuserid
To : input.Your_Email_Address
Subject : "The feedback you had sent has been incorporated in zohocreator"
Message : "The details are as below" + "Category " + input.Feedback_Category
+ "" + "Comments " + input.Comments
)
}
 

 示例应用程序

转至 https://creator.zoho.com.cn/sampleapps/script-actions/#View:On_User_Input_View 并编辑任何记录。有一个隐藏字段会采集其字段中新的更新值。下面的代码在“更新时”部分编写。

Updated_Value = Choose_any_option;

 相关链接

发送邮件

If 语句