You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

dynamic prompt table

8 replies [Last post]
a.mahesh197's picture
User offline. Last seen 11 years 39 weeks ago. Offline
Joined: 08/19/2008
Posts: 6

what is dynamic prompt table ,and how to create dynamic prompt table

Lepa's picture
User offline. Last seen 1 year 38 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: dynamic prompt table

You create a dynamic prompt the same way you do for a regular prompt BUT instead of writing the record name behind the record field properties, you write %EDITTABLE (see picture below). Then you would need to assign your "EDITTABLE" variable a value (your record name) using PeopleCode depending on some criteria you choose.

A sample code could look like this:

if "your criteria" then
  DERIVED.EDITTABLE = "YOUR_RECORD1";
else
  DERIVED.EDITTABLE = "YOUR_RECORD2";
end-if;

Place your code on the prebuild event at the component level.

PeopleSoft dynamic prompt table

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

a.mahesh197's picture
User offline. Last seen 11 years 39 weeks ago. Offline
Joined: 08/19/2008
Posts: 6
Re: dynamic prompt table

Thank u lepa ,from this i get a clear idea of dynamic prompt table

simrose's picture
User offline. Last seen 5 years 50 weeks ago. Offline
Joined: 08/01/2008
Posts: 33
Re: dynamic prompt table

One addition to above reply from Lepa , You also have to add the field DERIVED.EDITTABLE to the page where dynamic prompt record is there and make it invisible
or
else you will get the error (GetField: Field 'DERIVED.EDITTABLE' not found in scroll level 0. (2,155) )

a.mahesh197's picture
User offline. Last seen 11 years 39 weeks ago. Offline
Joined: 08/19/2008
Posts: 6
Re: dynamic prompt table

thank u simrose

simrose's picture
User offline. Last seen 5 years 50 weeks ago. Offline
Joined: 08/01/2008
Posts: 33
Re: dynamic prompt table

Does it worked - Mahesh??

akkilwewant's picture
User offline. Last seen 11 years 43 weeks ago. Offline
Joined: 09/12/2008
Posts: 3
Re: dynamic prompt table

where we can place this peoplecode code?

simrose's picture
User offline. Last seen 5 years 50 weeks ago. Offline
Joined: 08/01/2008
Posts: 33
Re: dynamic prompt table

compoment.record.fieldchange (.DERIVED.EDITTABLE.FIELDCHANGE) is the best place to right the code

MarkN's picture
MarkN (not verified)
Re: dynamic prompt table

Has anyone figured out how to use the SetEditTable function with out put the DERIVED.FIELD on the page. PeopleBooks states that it is doable but I've not been able to get it to work. They solution listed above in this thread works great but for current my usage I really need to be able to change the prompt table with out adding the field to the page.

This is what my codes looks like so far

Local Record &REC;

&REC = GetRecord(Record.RC_PAYINIT);
&REC.SetEditTable("%EDITTABLE", Record.ZG_PAY_RUN2_VW);
&REC.ExecuteEdits();

Any help will greatly be appreciated...