Auto Increment a Number in PeopleSoft

No votes yet

Use the GetNextNumber function to increment the value in a record for the field you specify by one.

Syntax:
GetNextNumber ({record.field | record_name, field_name}, max_number)

Best place to add such code is in SavePostChange event.

Example:
My_Field = GetNextNumber(My_Record.My_Field, 99999999);

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!

Comments

Have a question? Please ask it on the forum instead.
hari's picture
hari (not verified)
Hi Nice

Hi
Nice

Nitin's picture
Nitin (not verified)
Re: Auto Increment a Number in PeopleSoft

There ia another function GetNextNumberWithCommits.
This created a new connection .. fetch the number,.. updated with new and commits.

One of them is having an Issue on OS390.

Lepa's picture
User offline. Last seen 2 days 19 hours ago. Offline
Joined: 06/23/2008
Posts: 457
Re: Auto Increment a Number in PeopleSoft

Nitin, your talking about GetNextNumberWithGapsCommit, right? I think you just forgot the word "Gaps". But yes I agree with you, GetNextNumberWithGapsCommit has more flexibility and provides better performance. Thanks for your tip!

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

Mayank's picture
Mayank (not verified)
Re: Auto Increment a Number in PeopleSoft

Nitin / Lepa i do agree with both of you..and want to update 1 more thing which is --
The GetNextNumberWithGaps function is very restrictive in its usage. The GetNextNumberWithGapsCommit function can be used in any event.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
The question below is to prevent automated spam submissions.
6 + 6 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.