You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

How do I prevent empty rows being saved to a record when a page is saved?

3 replies [Last post]
broady's picture
User offline. Last seen 8 years 8 weeks ago. Offline
Joined: 03/22/2012
Posts: 2

I thought there was a check box somewhere in Application Designer that would prevent records being saved where there was no data in non-key fields.
Am I correct or will I need to use Peoplecode to check if those fields are empty and if they are then delete that row?

Thanks in anticipation
John

Hari_aindian's picture
User offline. Last seen 6 years 13 weeks ago. Offline
Joined: 08/02/2010
Posts: 84
Re: How do I prevent empty rows being saved to a record when ...

Hi John,

We need to handle it in PeopleCode. If you are trying to populate data to a scroll manually then start populating data from 1st position meaning by default scroll will have a blank row. So start assigning data to that row and then do insert a new row.

In this way you can avoid a blank row and no need to code explicitly for avoiding the blank row. If you are unable to sort out the issue still then go for coding to check the NONE (Key fields).

Regards.
Hari.A

Lepa's picture
User offline. Last seen 1 year 31 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: How do I prevent empty rows being saved to a record when ...

Check out this post I wrote a while back, it deletes empty grid rows before saving the page. http://www.compshack.com/peoplesoft/delete-grid-blank-rows-entered-users-when-saving

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

broady's picture
User offline. Last seen 8 years 8 weeks ago. Offline
Joined: 03/22/2012
Posts: 2
Re: How do I prevent empty rows being saved to a record when ...

Many thanks Hari and Lepa