Showing posts with label Web App.. Show all posts
Showing posts with label Web App.. Show all posts

Wednesday, January 28, 2015

Enable/Disable swapable logic

Switching between Disabled and Enabled fields function


I needed to set several fields to disabled or enabled based on a status field. To do this in people code was easy enough using the field DERIVED_REC.EXT_ORG_ID.Enabled = False and DERIVED_REC.EXT_ORG_ID.DisplayOnly = True to disable. However to enabled I'd have to repeat that code with the opposite values. Often this switching is necessary in several places so I built this way of making the change in a function.

Example

I put the function in the first field FieldFormula of the record. Then you simple declare you function where you need it and call it with a boolean value.

Declare Function allowEditFields PeopleCode DERIVED_REC.EMPLID FieldFormula;
allowEditFields( True);
Function allowEditFields(&ENABLE);
   
   Local boolean &enabled;
   Local boolean &displayOnly;
   
   If &ENABLE Then;
      &enabled = True;
      &displayOnly = False;
   Else
      &enabled = False;
      &displayOnly = True;
   End-If;
   
   DERIVED_REC.STRM.Enabled = &enabled;
   DERIVED_REC.STRM.DisplayOnly = &displayOnly;
   DERIVED_REC.EXT_ORG_ID.Enabled = &enabled;
   DERIVED_REC.EXT_ORG_ID.DisplayOnly = &displayOnly;
   DERIVED_REC.MCM_TR_TO_DT.Enabled = &enabled;
   DERIVED_REC.MCM_TR_TO_DT.DisplayOnly = &displayOnly;
   DERIVED_REC.MCM_TR_FROM_DT.Enabled = &enabled;
   DERIVED_REC.MCM_TR_FROM_DT.DisplayOnly = &displayOnly;
   DERIVED_REC.MCM_TR_PROG.Enabled = &enabled;
   DERIVED_REC.MCM_TR_PROG.DisplayOnly = &displayOnly;
   DERIVED_REC.MCM_TR_PREV_ATD.Enabled = &enabled;
   DERIVED_REC.MCM_TR_PREV_ATD.DisplayOnly = &displayOnly;
   DERIVED_REC.MCM_TR_STDNT_ID.Enabled = &enabled;
   DERIVED_REC.MCM_TR_STDNT_ID.DisplayOnly = &displayOnly;
   
   DERIVED_REC.ADD_PB.Enabled = &enabled;
   DERIVED_REC.UPDATE_PB.Enabled = &enabled;
   DERIVED_REC.PRINT_BTN.Enabled = &enabled;
   
End-Function;

Thursday, March 13, 2014

Setting up the right titles

Understanding the Titles

Starting out with PeopleSoft I was always getting confused with what title/label/heading is put on what screen or menu option. Hopefully this reference will help straighten out the confusion.

Menu

The menu title on the comes from the Structure and Content short label reference.  This is also set in if you use the component registration wizard when setting up which folder you component will live under.









Search Page Title

The search page and add new page title comes from the Menu item label.  This is found in your custom menu and typical under a menu item called "Use".


























Page Tab Label

The tab title on your page is from the Item Label on your component.

Friday, February 7, 2014

Chrome Peoplesoft Object details

If you are using Chrome browser to view the object details and you can't do the Ctrl+J trick.  In chrome it is the shortcut to open downloads.  To get it to work you need to press J first then Ctrl and release J.  This will trigger the peoplesoft trick instead of Chromes download page.

J + Ctrl + J