Peoplesoft- 警告、错误、消息盒子

Peoplesoft- 警告、错误、消息盒子

PS页面中配置提示消息路径:

在这里插入图片描述

根据消息严重性不一样,会有不同的结果。

  1. 取消
  2. 消息
  3. 警告
  4. 错误

不同的消息,程序会根据不同的严重性进入不同的步骤。

  • 显示消息并且强制取消程序;
  • 显示消息并继续处理
  • 显示消息并视为警告
  • 显示消息并视为错误

Messagebox,winMessage类在以下类型中不会被触发;

  • SavePreChange
  • WorkFlow
  • RowSelect
  • SavePostChange
  • Any PeopleCode event that fires as a result of a ScrollSelect (or one of its relatives) function calls, or a Select (or one of its relatives) Rowset class method.

MessageBox

	syntax:MessageBox(style, title, message_set, message_num, default_msg_txt[, paramlist]);
	
	--使用案例
	MessageBox(0, "", 1, 2, &string);
	
	
/*
"0"是buttons,类型详情参考下标;
	""在web服务中会被忽略;
	"1"是PS中的消息集合编号;
	"2"是PS中的消息编号;
	"&String"是找不到消息集合编号&消息编号时,会默认提示该内容;
	"[paramlist]"会动态替换【消息目录页面】的【消息文本】、【详细描述】两个字段中的动态字段 %X ;
	注意:会根据消息的【严重性】来进行程序执行与否!!
*/

MessageBox不同buttons类型:

CategoryValueConstantMeaning
Buttons0%MsgStyle_OKThe message box contains one push button: OK.
1%MsgStyle_OKCancelThe message box contains two pushbuttons: OK and Cancel.
2%MsgStyle_AbortRetryIgnoreThe message box contains three pushbuttons: Abort, Retry, and Ignore.
3%MsgStyle_YesNoCancelThe message box contains three pushbuttons: Yes, No, and Cancel.
4%MsgStyle_YesNoThe message box contains two push buttons: Yes and No.
5%MsgStyle_RetryCancelThe message box contains two push buttons: Retry and Cancel.

messagebox不同buttons类型的返回值(数值型):

ValueConstantMeaning
-1%MsgResult_WarningWarning was generated.
1%MsgResult_OKOK button was selected.
2%MsgResult_CancelCancel button was selected.
3%MsgResult_AbortAbort button was selected.
4%MsgResult_RetryRetry button was selected.
5%MsgResult_IgnoreIgnore button was selected.
6%MsgResult_YesYes button was selected.
7%MsgResult_NoNo button was selected.

winMessage

/*一般用于调试测试使用;*/
winmessage("一般用于调试测试");

Warning

/*一般在报表中使用警告*/
warning("警告内容")/*
直接提示默认内容,不会中断程序
*/
Warning MsgGet(1000, 1, &String);
/*
	"1000"PS中的消息集合编号,"1"是PS中的消息编号;"&String"是找不到消息集合编号&消息编号时,会默认提示该内容。
*

error

Error("提示错误内容");
/*
直接提示默认内容,会中断程序
*/
Error MsgGet(11100, 180, &String);
/*
	"11100"PS中的消息集合编号,"180"是PS中的消息编号;"&String"是找不到消息集合编号&消息编号时,会默认提示该内容。注意不能与MsgGetExplainText 同时使用,否则页面会提示两条信息!
*/

MsgGet

/*无论消息的严重性如何,只做获取消息;*/
&MsgText = MsgGet(30000, 2, "Message not found","动态参数1","动态参数2","动态参数3");

MsgGetExplainText

/*无论消息的严重性如何,只做获取消息;获取消息的同时,可以动态替换消息内容;*/
&MsgText = MsgGetExplainText(message_set, message_num, default_msg_txt[, paramlist])
/*
	"[paramlist]"会动态替换【消息目录页面】的【详细描述】字段中的动态字段 %X ;
	注意:【消息文本】中不能出现动态参数,否则会找不到消息!!!不能于error同时使用,否则页面会提示两条信息!
*/

注意:

MessageBox、Warning、winmessage函数不会终止程序;Error会终止程序。当然,根据选择的不同的消息严重性也会结果不同,例如:MessageBox采用的消息如果严重性时取消或者错误,也会终止程序。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值