Monday, June 11, 2018

Migrate Generic Templates between databases

Generic Templates can be migrated from one database to another using Datamover export and import scripts. Which Template ID that are exported and imported can be controlled with WHERE clause.

1. Verify data to export, with SQL similar to this;
SELECT * FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
SELECT * FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
SELECT * FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';


2. Example Data Mover Export Script to export Generic Templates;
SET LOG C:\TEMP\GEN_TEMPLATE.LOG;
SET OUTPUT C:\TEMP\GEN_TEMPLATE.DAT;
EXPORT PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
EXPORT PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
EXPORT PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';


3. Example Data Mover Import Script to import Generic Templates into another Database;

SET LOG C:\TEMP\DATAMOVE.LOG;
DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'custom template name';
DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'custom template name';
DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'custom template name';

SET LOG C:\TEMP\IMP_TEMPLATE.LOG;
SET INPUT C:\TEMP\GEN_TEMPLATE.DAT;
SET NO SPACE;
SET NO RECORD;
SET NO INDEX;
IMPORT *;



4. Example of this running in a Demo system for Generic Template named 'THOMAS'.

EXPORT Script;
SET LOG D:\User\LThomas\3-1713987231\EXP_TEMPLATE.LOG;
SET OUTPUT D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT;
EXPORT PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS';
EXPORT PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS';
EXPORT PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS';

Started: Tue May 25 14:42:30 2010
Data Mover Release: 8.49.22
Database: Q900ZXYX (ENG)
Exporting WL_TEMPLATE_GEN
Export WL_TEMPLATE_GEN 1
Exporting WL_TEMPL_GEN_TK
Export WL_TEMPL_GEN_TK 1
Exporting WL_TEMPL_GEN_RS
Export WL_TEMPL_GEN_RS 0
Ended: Tue May 25 14:42:31 2010
Successful completion
Script Completed.


5. Example of this running in a Demo system for Generic Template named 'THOMAS'.

IMPORT Script;
SET LOG D:\User\LThomas\3-1713987231\DATAMOVE.LOG;
DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS';
DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS';
DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS';

SET LOG D:\User\LThomas\3-1713987231\IMP_TEMPLATE.LOG;
SET INPUT D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT;
SET NO SPACE;
SET NO RECORD;
SET NO INDEX;
IMPORT *;

Started: Tue May 25 14:51:12 2010
Data Mover Release: 8.49.22
Database: Q900GXAE (ENG)
SQL Successful - DELETE FROM PS_WL_TEMPLATE_GEN WHERE WL_TEMPLATE_ID = 'THOMAS'
SQL Successful - DELETE FROM PS_WL_TEMPL_GEN_TK WHERE WL_TEMPLATE_ID = 'THOMAS'
SQL Successful - DELETE FROM PS_WL_TEMPL_GEN_RS WHERE WL_TEMPLATE_ID = 'THOMAS'
Ended: Tue May 25 14:51:12 2010
Successful completion
Started: Tue May 25 14:51:12 2010
Data Mover Release: 8.49.22
Database: Q900GXAE (ENG)
Input file: D:\User\LThomas\3-1713987231\GEN_TEMPLATE.DAT (ENG)
Commit done at end of record
Importing WL_TEMPLATE_GEN
Import WL_TEMPLATE_GEN 1
Records remaining: 2
Importing WL_TEMPL_GEN_TK
Import WL_TEMPL_GEN_TK 1
Records remaining: 1
Importing WL_TEMPL_GEN_RS
Import WL_TEMPL_GEN_RS 0
Ended: Tue May 25 14:51:13 2010
Successful completion
Script Completed.

Monday, April 30, 2018

Pages Used to Administer Content References

Page Name
Definition Name
Navigation
Usage
Content Ref Administration (content reference administration)
PORTAL_CREF_ADM
PeopleTools, Portal, Structure and Content, Portal Objects
Navigate to the Content References list and click Edit.. Or click Add Content Reference.
Add new content references or edit existing content references.
Content Reference Security
PORTAL_CREF_SEC
PeopleTools, Portal, Structure and Content, Portal Objects, Content Ref Administration, Security
Set content reference security.
User ID Queries
USER_QUERY
PeopleTools, Security, User Profiles, User Profiles, User ID Queries
Review content reference security by user.
Permission List Queries
PLIST_QUERIES
PeopleTools, Security, Permissions & Roles, Permission Lists, Permission List Queries
Review content reference security by permission list.
Role Queries
ROLE_QUERY
PeopleTools, Security, Permissions & Roles, Roles, Role Queries
Review content reference security by role.
Select a Content Reference or Content Reference Link
PORTAL_CREF_SELECT
PeopleTools, Portal, Structure and Content, Portal Objects
Navigate to the Content References list and click Add Content Reference Link.
Select a content reference or content reference link.
Content Reference Link Administration
PORTAL_CREF_LNK
  • Click a content reference link on the Content Reference or Content Reference Link page.
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click Create Link.
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click Edit for any content reference of usage type Target.
    Click Create Content Reference Link.
Add new or edit existing content reference links.
Related Links Group
PORTAL_RLNK_ADM
  • PeopleTools, Portal, Structure and Content, Portal Objects
    Navigate to the Content References list and click the Edit link.
  • Select the template name RELATEDLINKS_TEMPLATE.
    Enter RELLINK in the Name field of the Content Reference Attributes section.
    Enter a label for the attribute.
    Click the Edit Related Links link.
Create related links groups.
Security
PORTAL_CLINK_SEC
PeopleTools, Portal, Structure and Content, Portal Objects, Content Reference Link Administration, Security
Set content reference link security.

Thursday, April 26, 2018

Site Name Is Not Valid When Clicking Search Results

Tools VersionOn : 8.55 version, Elastic Search 

When searching with Elasticsearch in a test 9.2 we receive results but when clicking the result we are receiving the error ""Site name is not valid. check your syntax and try again." when clicking a result on the search results page. 

WorkAround:


Navigate to Integration Broker Nodes and sort by local. Check the Portal and Content URLs of each node marked local to verify the site name is in lower case for both.

Here are the steps to make it work after a change to the Portal or content URL's:
Make certain this change is made to ALL LOCAL NODES. For example, for HCM, this would need to be defined for PSFT_HR and HRMS nodes.

After you make the above changes, you will need to rebuild the search indices. Do this as follows:

A. Undeploy/Redeploy any Search Definitions that were built with incorrect URL's as follows:
  • Navigate to PeopleTools, Search Framework, Administration, Deploy/Delete Object
  • Check box next to the non-working Search Definition
  • Click 'Undeploy'
  • After it completes, check the box next to Search Definition and this time click 'Deploy'
B. Rebuild Search Index
  • Navigate to PeopleTools, Search Framework, Administration, Schedule Search Index
  • Bring up the Run Control needed to run a Full Index build and launch it.
C. After the "Build Search Index" process has completed, re-test and verify that issue is resolved.

This should fix the issue as the links were indexed with the prior entries.

Monday, April 23, 2018

How to disable "Personalize Page" link for all users? And Give Access to Adminstrator?

To disable "Personalize Page" link globally, please use the following steps 1. Navigate to Peopletools > Personalization > Personalization Options 2. Select "PPTL" for People Tools 3. Locate CUSTOMPGSET - Customize Page Settings 4. Set Option Default Value to N 5. Save If you would like to have administrate to override the global option, use the following steps 1. Navigate to Peopletools > Security > Permissions and Roles > Permission List 2. Open the permission list that only shared among the Adminstrator 3. At the Personalization tab, add a new row 4. Choose "PPTL" for Option Category Level, and "PS Internet Architecture" for Option Category Group 5. Click Edit link and select "Allow User Option" for Customize Page Settings row. 6. Click OK and Save 7. Go to Main Manu and select My Personalization 8. Click "Personalize General Options" 9. Set the Override value for "Customize Page Settings " and Click OK

How To Restrict Users From Adding Homepages or Tiles in Fluid Homepages

The Add To functionality (all of it not just parts) are determined by 3 things: 1. Does the component itself have the Add To functionality enabled in Component Properties (default is enabled): - Open component definition in App Designer - Access the component's Component Properties. - Click the "Fluid" tab - Check "Add To" option box to see if it's checked 2. Does the user have permission to access the iScript which performs the Add To functionality? Development stated the following code is checked specifically: --IsIScriptAuthorized("WEBLIB_PTNUI", "PT_BUTTON_PIN", "FieldFormula", "IScript_SavePin", %Action_UpdateDisplay); So one can check: - PeopleTools > Security > Permissions & Roles > Permission Lists - Open the user's individual permission lists - Go to the "Web Libraries" tab - See if there is permission given to: Web Library: WEBLIB_PTNUI Function: PT_BUTTON_PIN.FieldFormula.IScript_SavePin 3. The form factor of the device being used to access the application. The Add To functionality is disabled on the small form factor. So users accessing the application from a small form factor device (such as smartphones) will not see the Add To feature. The above will determine access to all 3 of "Add To Homepage", "Add To Favorites" and "Add To Navbar". There are no options at a more granular level to control each individual "Add To" item.

How to Hide Global Search Icon and Add To items in Fluid Navigation Header

On the Fluid landing page, the Global Search icon and the 'Add to' items on the Actions list can be hidden by removing security access to components PTSF_GBLSRCH_FLUID and PTSF_GLOBAL_SEARCH under menu PORTAL_ADMIN in permission list PTPT1000. On the Learning Home Dashboard page, it is more involved, since the Fluid landing page is a physical component whereas Classic Learner Home is a Content reference link. - To hide the Global Search icon - Going to PeopleTools > Portal > General Settings, then turning off "Display global search in header" removes the global search icon from the header. - To hide the 'Add to...' items from the Actions list - To remove access for users to the 'Add To...' items, you need to remove security access to point #2 in Doc ID 1983068.1 (see Related Knowledge). In other words, remove access to the iScript WEBLIB_PTNUI.PT_BUTTON_PIN.FieldFormula.IScript_SavePin Note: This hides all of the 'Add to...' items from the Actions list; there is currently no way to selectively choose which 'Add to...' items you hide/unhide, it is all or nothing. Source : Doc ID 2198358.1

Tuesday, April 22, 2014

Using Union All in PeopleSoft Query ( PSQuery )

When creating a PeopleSoft Query that uses a union, PeopleSoft will always use a union instead of a union all.
Using a Union statement causes the query to have all duplicate rows in the result set removed.  In some cases this is appropriate but in many cases it is not.  If another tool was being used, the Union statement would be changed to a Union All and then the duplicate rows would not be removed.
 PSQuery does not provide a builtin way to change the Union to Union All, but I will show you two ways you can accomplish this on a Microsoft SQL Server database.  ( This may work on Oracle or DB2 but I have not had a chance to test it )
 Option 1: add a NewID() field
This is by far the simpler of the two options. To Accomplish this:
  1. Right click on "Expressions" and choose "New Expressions"
  2. Type newid() in the box
  3. Click OK
  4. Add this new expression as a field to select. (click on the fields tab, expand the expressions so you see the newly created one and drag it over to where the fields are listed)
  5. Repeated for each of your queries in the union
This method is quick and easy with only one drawback.  Your query results will an extra column with text such as "37FCA8B1-E856-4C0D-8248-B4C417C35848" in it.  If you are displaying the results of the query via a Crystal Report or nVision report, then just don't display this field and your problem is solved.  If the end-user of this query is going to be using the PS Query tool and you do not want them to see this field, you should consider option 2 below.

Option 2: Hiding the union in a subselect
This method is more work but the results are great with no extra column.  I have only had a chance to test this on MSSQL, so I don't know if it will work on Oracle or DB2.  The main part of this workaround is to wrap the union that PSQUERY generates in a SubSelect and then force our own union all statement in it's place.  PSQuery provides some flexibility in what you can put in an expression statement and we will use that to our advantage
Step 1:Create the first query
Create your first query in your union as usual
Step 2:Add a criteria at the bottom
Add an additional criteria at the bottom of your criteria list.  Pick a field on the left hand side of the criteria and on the right side choose expression.  If using an aggregate in your query you would need to add a new having criteria instead.
Step 3:Creating the first query expression
This is the tricky part.  In the expression you just added.  Type the Alias.Fieldname of the field you are selected, then type UNION ALL  SELECT null,null where not exists (select 'x' 
You must include the same number of nulls in your select statement here as in your first query.  ( I have 2 in this example )




Step 4:  Create the Second Query
Create your second query in the union as you normally would
Step 5:  Create a new expression in the second query
Create a new blank expression in the second query.  The datatype of this expression should match the datatype of the first field in your Fields to display
Step 6:  
In the expression enter 
null where 1 = 2
Union all
Select <FirstFieldName>
Replace <FirstFieldName> with the Alias.FirstFieldname in your Fields list
Step 7: Remove the first field and replace it will the expression
When you look at your sql you should be something like below
SELECT A.BUSINESS_UNIT, A.ORDER_NO
  FROM PS_ORD_LINE A
  WHERE A.ORDER_NO =  A.ORDER_N
UNION ALL 
     SELECT null,null where not exists (select 'x' UNION SELECT  null where 1 = 2 )
UNION ALL SELECT  B.BUSINESS_UNIT, B.ORDER_NO
  FROM PS_ORD_LINE B
 You can do this trick for as many unions as your need.