on December 21st, 2007 under
.Most of the times we would have faced a requirement of having Dynamic prompt table for Record Fields. Also PeopleSoft itself very much utilizes Dynamic Prompt table. How can weachieve the same in our project????Here we goThis is accomplished by 2 ways1.Using EDITTABLE fields for Prompt Table2.Using Dynamic Views
1. Usage of EDITTABLE Fields
In this method,
Prompt table property of Record Fields should be assigned with %EDITTABLE value
. Actually what does it mean????Prompt Table value for the Record Field is populated from the Record FieldDERIVED.EDITTABLE value. The Record Field DERIVED.EDITTABLE should be assignedwith value either in one of the Peoplecode events (Either in FieldChange or FieldEdit or RowInitevents). This is simply done byDERIVED.EDITTABLE = “PERSON_NAME”;
EDITTABLE Field should be present in the SAME Page, where Record Field (In thiscase, The Field is nothing but EMPLID) is also referred. If the Record Field is not coming under Component Search Record Field, there is no need for placing the EDITTABLE field in the Page.
2. Usage of Dynamic Views
As we know, while creating Dynamic view, there is no need to specify the SQL. This SQLshould be generated dynamically and the same should be assigned to the Record Field.Say for example, if we see the above Record Field TASK_PROFILE_ID, it is assigned withdynamic prompt table view TL_TSKGRP_DVW and this view TL_TSKGRP_DVW isdynamically initialized by the following Peoplecode, which can be assigned both in FieldChangeand RowInit events of the Record Field TASK_PROFILE_ID.RECORDNAME.TASK_PROFILE_ID.SqlText = “SELECT T.TASKGROUP,T.TASK_PROFILE_ID, T.DESCR FROM PS_TL_TSKGRP_PRF_W T WHERET.TASKGROUP = ‘” | &TSKGRP | “‘ AND T.EFFDT =(SELECT MAX(T1.EFFDT) FROMPS_TL_TSKGRP_PRF_W T1 WHERE T1.TASKGROUP = T.TASKGROUP ANDT1.TASK_PROFILE_ID=T.TASK_PROFILE_ID AND T1.EFFDT<= %datein( ‘” | &maxdate |“‘) )”;
How to use a Dynamic prompt table? What we need to do for it? What should be the length of the field to be added in the DERIVED record?