Bridging the gap to Fusion through our PeopleSoft Solutions Extenders
Grey Sparling PeopleSoft Expert's Corner
Oracle Blogs
 Subscribe Now!
Interact with the experts here at Grey Sparling Solutions, Inc.

Friday, September 21, 2007

Creating Optional Parameters for a PeopleSoft page

So, you want to navigate to a PeopleSoft page, passing the parameters to open a specific item. But now, you want to pass a parameter that does something within the page:

  • Populate the search items in an inquiry page and search based on the parameter.
  • Set the vendor to be used in the voucher page
  • Navigate to a row in a grid in the page

These are but a few examples

You can really do that?

Of Course! It's actually pretty straightforward. The key to this is the Request object (it's actually documented in PeopleBooks as part of the Iscript class, but is available for standard pages as well).

So, all you need to do to add a parameter to your page is to write code in the page activate peoplecode that looks for a parameter in the request object with the name you want (or a set of names). Once you have those parameters, you can use them in different ways (as listed above.

/* Code to do something with account number passed in as a parameter */

Local string &sAcctNum = %Request.GetParameter("ACCOUNT");
If All(&sAcctNum) Then
    Rem Do something with &sAcctNum;
End-if;

Because you can look for any parameter, regardless of whether it's actually passed, you have a lot of flexibility (and you can look for as many as you want). Therefore, you could actually go through and look for every chartfield on the URL and use the combination of the ones you found to do some logic.

The next posting will show how this technique can be used to fix limitations in drilling to pages that were glossed over in the following posting.

Labels: ,

0Comments:

Post a Comment

<< Home