locked
Prepopulate new item form on a custom list with previous entry RRS feed

  • Question

  • So I have a custom list with a lot of fields on it to collect data. Management want the data collecting techs to use the form view for new entry, and not to use the data sheet view.

    So having a lot of fileds that will be the same (like building, floor, room) for next item to be added, I was wondering if there's a way to have the new item from to prepopulate it's fields (or some of them like building, floor, room, etc.) based on the last added item to the list?

    Tuesday, November 15, 2016 7:46 PM

Answers

  • Hi Ray,

    You will have to modify/customize the New Item form to pull the last saved record. You can either use:

    1. create new form, add an XSLT view in it and query the last saved record to load.

    2. Copy the current New Item form and add JS to load last saved record and populate in fields.

    3. Create and InfoPath form which loads the last saved record on page load ( add rules on form load).

    Tuesday, November 15, 2016 8:11 PM
  • You can either use a event receiver or SPServices library to query list items and set fields on the new form. 

    Tuesday, November 15, 2016 8:17 PM

All replies

  • Hi Ray,

    You will have to modify/customize the New Item form to pull the last saved record. You can either use:

    1. create new form, add an XSLT view in it and query the last saved record to load.

    2. Copy the current New Item form and add JS to load last saved record and populate in fields.

    3. Create and InfoPath form which loads the last saved record on page load ( add rules on form load).

    Tuesday, November 15, 2016 8:11 PM
  • You can either use a event receiver or SPServices library to query list items and set fields on the new form. 

    Tuesday, November 15, 2016 8:17 PM