I'm working on this project where i have to generate an id number.
On my page, i use a SQLExec statement to get the max number of entries for this table. Then, i increment that number by 1 and that's how i ensure that the id is unique. I have to display this id in a scroll area, which is where i run into trouble. My approach works fine if the user keeps saving each entry in the scroll before adding a new one.
On the other hand, if they just want to add an entry, the id number wont increment because the last entry hasn't been saved yet (hence, my sqlExec statement still retrieves the old max number from the database). I tried to increment variables instead but ran into problems. Does anybody know of an easy solution? Sorry, i'm a PeopleSoft newbie. Appreciate any advise.
On my page, i use a SQLExec statement to get the max number of entries for this table. Then, i increment that number by 1 and that's how i ensure that the id is unique. I have to display this id in a scroll area, which is where i run into trouble. My approach works fine if the user keeps saving each entry in the scroll before adding a new one.
On the other hand, if they just want to add an entry, the id number wont increment because the last entry hasn't been saved yet (hence, my sqlExec statement still retrieves the old max number from the database). I tried to increment variables instead but ran into problems. Does anybody know of an easy solution? Sorry, i'm a PeopleSoft newbie. Appreciate any advise.