Tips for Creating Views


Generally you should try to re-use views whenever possible and PeopleSoft has literally thousands of them so have a look first.

The majority of views I've created are to return the latest effective dated/sequenced/active rows from a table. I refer to these as current data views. So my view name usually includes the CURR in the name which is short for current. For example, a view for current people's names in the system might be called:

PB_CURR_NAME_VW

Remember, you have 15 characters to work with:

  • 3 characters are going to go to your customisation prefix (e.g. PB_ in my example) unless you are fortunate enough to have a 1 character prefix (or unfortunate enough to have more!).
  • 3 characters are going to go to identifying that this is a view _VW

That leaves you with 9 characters, one of which is probably going to be an underscore (_) to separate words. So think about that when you go to name your view.

A few other tips when creating a new view that you want others to use:

  • Include as many of the fields from the underlying tables as possible. So long as it make sense to do so based on the SQL in the view. The more fields, the more likely that your view will provide the information someone else wants.
  • Don't include more business rules/logic in the view than what is absolutely necessary. For example, if you have a view that returns current names, then don't just include primary name types - return all name types and then filter the name types you need in your own code. Of course don't make it too hard on yourself either - there's no point having a view that you have to add a number of conditions to just for the sake of reuse. Remember reuse is going to be a comprimise.
  • Give your views a decent name & description. Its hard to find views for reuse, don't make it any harder by using an obscure name and not providing a relevant description.

Revision #1
Created Mon, Sep 9, 2019 6:08 PM by PeopleSoft Wiki
Updated Mon, Sep 9, 2019 6:18 PM by PeopleSoft Wiki