binding form fields to a different SharePoint list

Posted on 2014-08-19
Last Modified: 2014-08-20
SharePoint 2010

I have the standard CRUD for an SP list. However, I want the user to click a dropdown list and select a value. Based on the selected value, I want to use jQuery in a CEWP to dynamically show additional EMPTY fields based on the selection made that correspond to columns on another list. i can do all of the jQuery stuff, but I think the biggest problem is how to set up the binding for these fields so that they will submit the data to a different list on the same site collection, not the current list. I do not want to use InfoPath, if possible, as I understand this is being phased out. I do not want the additional data entered to show up on the list that launched the form and i would rather not have it associated with it at all, it is purely for entry convenience because one list's data should cause entries in another list.  It is possible and easy to use workflows to submit the data to the other list, but if those form fields are being dynamically generated via jQuery, and none of those values are being written to the current list, then the workflow doesn't have the data it needs.

So is it possible to set the binding in code for additional form fields, not bound to any column on the current list, to columns in another list instead? Seems like CQWP is good for viewing data from multiple lists, but not for submitting data to multiple lists simultaneously. I'm looking for a "binding" property and hoping I can enter in a column from another list rather than the current one. Don't know how the external address part of the other SP list would be handled as I'm sure I need that info provided, as well as the actual column name.
Question by:BobHavertyComh
    LVL 15

    Accepted Solution

    If I understand your question correctly, then I think you should be able to utilise Sharepoint 2010's ECMAScript to write data to a second list.  Provided you can get your UI working in jQuery, it should be relatively painless to insert into another list in the same site using this.

    Here is a general overview - have a look and see if this fits the bill for what you want to do:

    Here is an example of inserting into a list:

    This technology is pretty much what Sharepoint 2013 apps are based on (jQuery + ECMA script) so it's worth investigation.
    LVL 9

    Author Closing Comment

    I didn't have to time read through it all yet, but I can certainly understand it as I am familiar with the SP obj model and very familiar with Javascript and JSON, so I can figure this out. Didn't know that SP has it's own version of Javascript. and JSON  Looks like the right solution because it's lightweight, and as I understand it, SP 2013 does use a lot of this, and the article your linked was for SP 2010. So it looks like this is going to work and is the best way to do it given they eventually adapted it for 2013. Thanks.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now