Search code examples
expressionuseridpeoplesoft

peoplesoft oprid as a field in a query


Is there a way to add the oprid of the person who runs the query into the query result?

Example: If my oprid is hr01 and I try running a specific query with a prompt that limits the result to 1 row - Performance Ratings of Employee XXXXX as of XX-XX-XXXX, a 1 row result would come up (or exported as excel) with my oprid appearing as the last column. If somebody else runs this report, the the oprid appearing in the last column should be that user's oprid.

I know that we usually get the oprid from PSOPRDEFN or PSQRYEXECLOG or even EMPLMT_SRCH_GBL, but how do you make this join with the existing query?

Can someone please point me to a direction? Or is this even possible?


Solution

  • Create an expression, and give it the value %operatorid

    Then add this expression as a field to you query and you are done.

    If you need to concatenane it to some constants or others field , you'll have to encapsulate it between ()

    Example :

    'Performance Ratings of Employee XXXXX by '||(%operatorid)