Dynamic DropDown Lists

If you have a drop down list on a page and want to place items into the drop down list dynamically, here is a bit of insight on how to do it.

 

This tip is taken from our discussion forum thread How to get drop-down list dynamically?


The SetEditTable method works with the ExecuteEdits method. It is used to set the value of a field on a record that has it's prompt table defined as %PromptField value. %PromptField values are used to dynamically change the prompt record for a field.

There are several steps to setting up a field that you can dynamically change its prompt table.

To set up a field with a dynamic prompt table:

Define a field in the DERIVED record called fieldname.

In the record definition for the field you want to have a dynamic prompt table, define the prompt table for the field as %PromptField, where PromptField is the name of the field you created in the DERIVED record.

For more information, see Creating a New Record.

Use SetEditTable to dynamically set the prompt table.

%PromptField is the name of the field on the DERIVED work record. RECORD.recordname is the name of the record to be used as the prompt table.

&MSG.SetEditTable("%EDITTABLE1", Record.DEPARTMENT);

&MSG.SetEditTable("%EDITTABLE2", Record.JOB_ID);

&MSG.SetEditTable("%EDITTABLE3", Record.EMPL_DATA);

&MSG.ExecuteEdits();

Every field on a record that has the prompt table field %EDITTABLE1 will have the same prompt table, such as, DEPARTMENT.

转载于:https://www.cnblogs.com/GoDevil/archive/2009/01/09/1372659.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值