一些peoplecode小技巧平【二】
1. Set component changed page field property:
For understanding this open a page in application designer and in the field property of one of the edit field uncheck the property Set component Changed and save the page. Now go on the online page, make some changes in field value and save the page.
What do you think will happen with that field value?
Open online page again and you will find that field value is not changed. Why?
Because Set component Changed property of field helps component buffer to check whether any change in that value has happened. If this property is unchecked any change in the field is ignored and that field in component buffer stays unchanged.
2. Disable saving page component property:
In component properties under Use tab there is a property checkbox named Disable saving page. After we check this checkbox, the save toolbar button in component properties under internet is automatically disabled, i.e delivered save button functionality can not be used after that. This property is very useful in removing that annoying error on page when we move out of the component without saving which says You have unsaved data on the page. Click OK to go back and save or click Cancel to continue without saving.
Don't worry still you can use DoSave() and DoSaveNow() functions using peoplecode to save the data in component.
This property has following significance:
- To remove the unsaved data prompt while moving away from component without saving.
- To disable the delivered save but we can use other toolbar buttons.
3. Search Edit Record field property for Search keys:
In record field properties when we select Search key option, Search edit is enabled to be selected.
Actually SetSearchEdit() function is for limiting the user search to '=' and to 'IN' operators.
e.g. if you want to search the data of Employee ID '12345' so on the search page you have to enter the whole Employee ID '12345'.
If you will think that after entering only '123' in search field will enlist all the employee IDs starting with '123', search edit set on employee ID will prevent this from happening and search will give some error.
So now your search is limited to '=' or 'IN' only as:
EMPLID = '12345'
or
EMPLID IN ('12345')
If you want to remove search edit from some field, simply use function ClearSearchEdit() on SearchInit for this. Or for enabling search edit, use function SetSearchEdit().
4. DiscardRow() and StopFetching() peoplecode functions:
DiscardRow() and StopFetching() are the delivered peoplecode functions which can only be used in RowSelect event.
DiscardRow is not to select a particular row based on some certain condition but continues with the next row in RowSelect.
But unlike the DiscardRow, StopFetching stops the execution of RowSelect based on some certain condition which we provide in peopleode on RowSelect event. From the definition of StopFetching function, we can understand that it acts like and error in RowSelect event.
5. Accessing the related display field in grid on peoplesoft pages:
There could be chances that we are required to access the related display field on grid. If there is only one record field as related display then its fine, no problem there. But it is complicated when there are multiple related displays from the same record fields.
Let us say that in one of the grid we want to show the names for JOB.SUPERVISOR_ID and JOB.EMPLID and these fields are display control fields and related fields for both is PERSON_NAME.NAME so referencing the related field of JOB.SUPERVISOR_ID will be an issue with the grid referencing syntax as it will reference the related field of JOB.EMPLID also.
Now here is the syntax for the same:
Let row of that field is &Grid_Row
Now accessing the related field of JOB.SUPERVISOR_ID:
&Grid_Row. JOB.SUPERVISOR_ID.GetRelated (PERSON_NAME.NAME).value;
Now accessing the related field of JOB.EMPLID:
&Grid_Row. JOB.EMPLID.GetRelated (PERSON_NAME.NAME).value
一些peoplecode小技巧平【二】的更多相关文章
- PHP开发小技巧②—实现二维数组根据key进行排序
在PHP中内置了很多对数组进行处理的函数,有很多时候我们直接使用其内置函数就能达到我们的需求,得到我们所想要的结果:但是,有的时候我们却不能通过使用内置函数实现我们的要求,这就需要我们自己去编写算法来 ...
- android小技巧(二)
一.如何控制Android LED等?(设置NotificationManager的一些参数) 代码如下: final int ID_LED=19871103; NotificationManage ...
- Swift开发小技巧--扫描二维码,二维码的描边与锁定,设置扫描范围,二维码的生成(高清,无码,你懂得!)
二维码的扫描,二维码的锁定与描边,二维码的扫描范围,二维码的生成(高清,无码,你懂得!),识别相册中的二维码 扫描二维码用到的三个重要对象的关系,如图: 1.懒加载各种类 // MARK: - 懒加载 ...
- 一些peoplecode小技巧【一】
1. Get the description of the translate value: No need to write SQLEXEC on PSXLATITEM passing fieldn ...
- MAC使用小技巧(二)
一.Safari-->广告数量不足 --原因:DNS被拦截,被恶意推送广告. ----------------------------- [ 思路 ] 修改hosts文件 $ cd /etc $ ...
- js小技巧(二)
//移动的图层,拖动 1.<span style='position:absolute;width:200;height:200;background:red' onmousedown=Mous ...
- C#一些小技巧(二)
教你们怎么改配色方案,因为本人智障了很久,每次想改颜色的时候都会看到一大圈的选项,难以琢磨,但是智障了那么久终于被我找到了所有的关联. 首先,要告诉你们的是,其实C#里面要改的东西只有那么几个,但是注 ...
- 玩转CSLA.NET小技巧系列二:使用WCF无法上传附件,提示413 Entity Too Large
背景:由于系统需要展示图片,客户上传图片到本地客户端目录,然后在数据库中存储本地图片地址,和图片二进制数据 错误原因:我是使用CSLA的WCF服务,使用了数据门户,WCF协议使用的是wsHttpBin ...
- Java开发小技巧(二):自定义Maven依赖
前言 我们在项目开发中经常会将一些通用的类.方法等内容进行打包,打造成我们自己的开发工具包,作为各个项目的依赖来使用. 一般的做法是将项目导出成Jar包,然后在其它项目中将其导入,看起来很轻松,但是存 ...
随机推荐
- 最大公约数Greatest Common Divisor(GCD)
一 暴力枚举法 原理:试图寻找一个合适的整数i,看看这个整数能否被两个整形参数numberA和numberB同时整除.这个整数i从2开始循环累加,一直累加到numberA和numberB中较小参数的一 ...
- C#导出带有格式的Excel(列宽,合并单元格,显示边框线,加背景颜色等)
源地址:http://blog.sina.com.cn/s/blog_74f702e60101au55.html 导出excel相关设置:http://blog.csdn.net/wanmingtom ...
- 无法向会话状态服务器发出会话状态请求请。确保 ASP.NET State Service (ASP.NET 状态服务)已启动
原文链接:http://www.cnblogs.com/IT-Bear/archive/2012/01/04/2311546.html 无法向会话状态服务器发出会话状态请求.请确保 ASP.NET S ...
- 第二章 D - Number Sequence(1.5.10)
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1301527312 大致题意: 有一串数字串,其规律为 1 12 123 1234 1234 ...
- locals()函数访问当前还在作用范围内的局部变量
>>> element = 'silver' >>> number = 47 >>> 'Element {number} is {element} ...
- 为textarea增加maxlength属性(转)
如果只是單純地想限制 textarea 中的字數,不想寫太多的話,可用: <textarea onkeyup="this.value = this.value.slice(0, 8 ...
- Oracle 启动状态解说
oracle 启动状态由nomount-mount-open 一. nomount状态下操作 08:09:49 idle> startup nomount; ORACLE instance st ...
- C与Lua互相调用的时候,栈变化分析
1 C调用Lua函数的堆栈变化 例子 Lua文件中的函数 function testNewCounter2() return "第四个结果" end C中的例子 void t_n ...
- 实验比较python中的range和xrange
1 结论: 全用xrange,除非你需要使用返回的列表 2 实验一:性能对比 实验环境:win7 ,64位系统 python2.7 import time StartTime=time.time() ...
- testng参数化方法:Parameters和DataProvider
Parameters注解在测试方法上指定参数列表,然后在测试方法中声明对应的形参,形参与参数列表一一对应,但名字可以不同,如下所示: public class Test1 { @Parameters( ...