Repeating group/field?

Nov 16, 2010 at 2:14 PM

I am looking for a way to create a repeating group of 3 fields in a sharepoint 2010 list.  We dont use Infopath and don't plan on it.  I have created an RMA list for our sales people to use for customers returning products for repair.  We service and repair medical equipment, so sometimes a single RMA can have several items on it.  When creating a new RMA I want them to be able to enter in the Manufacturer, Model and Serial Number of each piece of equipment, and then have the option to "Add Another" in the same form.  Is there a way to do this?

Coordinator
Nov 16, 2010 at 3:09 PM

Absolutely! What you want to do is a pretty standard parent/child list scenario. It's much like the classic example of an order header + order details construct.

You'll need two lists (at least) for this. Let's call them RMAs and RMA Details. You get basically the forms you need out of the box for RMAs, but you'll want to either incorporate the RMA Details addition form into the RMAs forms or build it in a wizard-like way, for which you can use SPRedirectWithID. Either way, you can either use standard SharePoint forms (they don't have to just live in the standard forms pages) or you can use the Web Services (my preference, of course, for an improved user expereience).

Make sense?

M.

Nov 16, 2010 at 3:49 PM

I’m not sure I really understand…

Would my second list contain only the three columns that I want to repeat? (MFG, Model, Serial #)

From: sympmarc [mailto:notifications@codeplex.com]
Sent: Tuesday, November 16, 2010 10:10 AM
To: Matt Peterson
Subject: Re: Repeating group/field? [SPServices:234891]

From: sympmarc

Absolutely! What you want to do is a pretty standard parent/child list scenario. It's much like the classic example of an order header + order details construct.

You'll need two lists (at least) for this. Let's call them RMAs and RMA Details. You get basically the forms you need out of the box for RMAs, but you'll want to either incorporate the RMA Details addition form into the RMAs forms or build it in a wizard-like way, for which you can use SPRedirectWithID. Either way, you can either use standard SharePoint forms (they don't have to just live in the standard forms pages) or you can use the Web Services (my preference, of course, for an improved user expereience).

Make sense?

M.

Read the full discussion online.

To add a post to this discussion, reply to this email (SPServices@discussions.codeplex.com)

To start a new discussion for this project, email SPServices@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Coordinator
Nov 17, 2010 at 3:13 AM

Your second list (RMA Details) would contain those three columns (the repeating group) plus some key to tie each item back to the parent item in RMAs. Usually you'd want to use the parent item's ID for that, as it is unique and a simple numeric value.

M.

Dec 8, 2010 at 9:38 PM

Okay.  I have two lists.  One is "RMA Entry" and the other is "RMA Serial #'s".  In the RMA Entry list, I have the columns:  CustomerID, Customer Name, RMA # (hidden field), Type of RMA (dropdown box), Customer Complaint (yes/no checkbox) and Salesperson ID.  Once the new RMA is submitted, a workflow runs which assigns a unique RMA # to the newly created item.  It combines the RMA Type with a number from another list (RGA#), then increments that number by 1 so the next new RGA can use the next number.   Also, if the Complaint box is checked 'Yes', another workflow runs to copy the newly created RMA to a list called "Complaints" where additional information can be entered. 

My second list, "RMA Serial #'s" has three columns:  MFG, Model, and Serial #.  I want to use this list (like you instructed) to enter this information when creating a new item in the "RMA Entry" list.  But I want to be able to add multiple serial numbers/items for a single RGA Entry.  You say that I want to use SPRedirectWithID but I'm not sure how to use it in this instance. 

Another thing that would help this project immensely is for the RGAID_ISSUE workflow to run as soon as someone clicks 'New' to create a new item in the RGA Entry list.  Right now, they have to create the RGA and then wait for the workflow to finish before giving that number to the customer. 

Any help with this would be greatly appreciated.  Thanks!

Dec 15, 2010 at 8:56 PM

Matt -

 

You can set up a button which would create a new item in your RGA Entry List - is the RGAID_Issue workflow not set to run on new items?  Once the update process runs, you could either run a modified "GetLastItemID" to pull the record ID of the last created RGA Item, or kick off the workflow manually also using the button, by calling the Workflow.StartWorkflow Method.  This could all be done with a couple of nested SPServices calls - all on the same page - and all without any page refreshes.  It would take a couple seconds to complete, but we've done very similar things on this end.  In fact, I need to replicate almost this exact scenario (with the parent/child list items) and this is how we'll do it.

-Rob D