Peoplecode Flashcards

Learin Peoplecode concepts

1
Q

Different Data Types

A

Conventions data types & Object data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Conventional Data types

A

Any - If type is not defined, then by default it is any. Peopletools determines the type of ‘ANY’ variable based on context at runtime.

Boolean
Date
DateTime
Float
Integer
Number
Object 
String
Time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Integer

A

32-bit signed twos complement number, so it has a range of -2,147,483,648 to 2,147,483,647

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Float

A

number represented using the machine floating binary point (double precision) representation.
This type is not suitable for calculation involving decimal fractions, particularty for money transactins.
For ex: .10 + .10 will not be .20 for this type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Number

A

Size limit of 34 digits not including decimal point. 32 digits to the right of decimal point.
Since the Number type is a floating decimal point representation, it is the appropriate data type for calculations involving money.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Operations

A

Operations other than Division is done using Integer arithmatic
Division is done using Floating point decimal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Recommendation on using Integer, Float, Number

A

Use Number for most applicable data values
Use Integer when counting item, for ex rows in rowset.
Use Float for

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Seperator Statements

A

It seprated one statement from another and is ;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Assignment statement

A

it is =, it can also be used in evaluation statement depending on context

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Branching statement

A

If, then, else

Evaluate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Looping statement

A

For, Repeat, While

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Language constructs

A

PeopleCode language constructs include:

Branching structures: If and Evaluate.

Loops and conditional loops: For, Repeat, and While.

Break, Continue, and Exit statements loop control and terminating programs.

The Return statement for returning from functions.

Variable and function declaration statements: Global, Local, and Component for variables, and Declare Function for functions.

The Function statement for defining functions.

Class definition statements.

Try, Catch, and Throw statements for error handling.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

example of a function declaration of a function that is in another FUNCLIB record definition

A

Declare Function UpdatePSLOCK PeopleCode FUNCLIB_NODES.MSGNODENAME FieldFormula;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Function parameter values tip

A

check the values of parameters that get passed to functions at runtime in the Parameter window of the PeopleCode debugger.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Function Naming Conflicts

A

If you define a function with the same name as a built-in function, the function that you defined takes precedence over the built-in function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

System Variables

A

System variables are preceded by a percent (%) symbol whenever they appear in a program. Use these variables to get the current date and time, or to get information about the user, the current language, the current record, page, or component, and more.

17
Q

Metastrings

A

SQLExec.

Scroll buffer functions (ScrollSelect and its relatives).

PeopleSoft Application Designer to construct dynamic views.

Some rowset object methods (Select, SelectNew, Fill, and so on).

SQL objects.

Application Engine.

Some record class methods (Insert, Update, and so on).

COBOL

18
Q

Variables scopr

A

Global: Variable valid in entire session
Component: Variable valid in all pages in component
Local: variable valid only locally

19
Q

3 different ways to refer the data in buffer

A

Similarly, to hide the VISIT scroll area on level three, you specify rows on scroll levels one and two.
Record convention: before 7.5
HideScroll(RECORD.OWNER, &L1ROW, RECORD.PET, &L2ROW, RECORD.VISIT);
To use the SCROLL.scrollname syntax, the previous example could be written as the following:
Post 7.5 - scroll syntax to remove ambiguity as it refers the primary record.
HideScroll(SCROLL.OWNER, &L1ROW, SCROLL.PET, &L2ROW, SCROLL.VISIT);
In PeopleTools 8, the object-oriented version of this is:

Local Rowset &VET_SCROLL, &OWNER_SCROLL, &PET_SCROLL, &VISIT_SCROLL;

&VET_SCROLL = GetLevel0();
&OWNER_SCROLL = &VET_SCROLL.GetRow(1).GetRowSet(SCROLL.OWNER);
&PET_SCROLL = &OWNER_SCROLL.GetRow(2).GetRowSet(SCROLL.PET);
&VISIT_SCROLL = &PET_SCROLL.GetRow(2).GetRowSet(SCROLL.VISIT);

&VISIT_SCROLL.HideAllRows();

20
Q

Fetching values from buffer -different ways

A

To fetch PET_BREED on level two:

&SOMEBREED = FetchValue(RECORD.OWNER, &L1_ROW, RECORD.PET, &L2_ROW, PET.PET_BREED);
In PeopleTools 8, the object-oriented version of this for the PET rowset is:

&SOMEBREED = &PET_SCROLL(&L2_ROW).PET.PET_BREED;