How do you validate/populate information on a Designer form from a list in SharePoint?

rss

Posted by Jdubs - Jan 23 ’15 at 03:22

I fundamentally want to know how to query a SharePoint list, and use that information in various ways to interact with a SP Forms Designer form.

 

Example Scenarios:

  1. User enters information in a field, and after field changs, perform a check on a SharePoint list to validate the entry into the field.  (For example, user enters an Account Number, and SP Form queries an Account SharePoint list and does a check to make sure the Account Number is listed.)
  2. User enters information in a field, and then perform a query to a SharePoint list that pre-populates the rest of the SP Form Designer fields based on that value. (For Example, user enters Account Number, and the "Account Name," "Account Approver," and "Account Location" are pre-populated based on the what is associated with that account in a SharePoint list.)

Let me know if that doesn't make sense!  Thanks!

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 20 days
    #1 by Dmitry Kozlov Jan 26 ’15 at 11:21

    Hi,

    Why don't you use a lookup column for Account Number and additional columns for Account Name, Account Approver, and Account Location? But if you still want to get data via JavaScript, you can use CSOM or REST-api:

    https://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx

    https://msdn.microsoft.com/en-us/library/office/dn292552(v=office.15).aspx

  • Jdubs
    Member
    Member for: 4 years 11 months 21 days
    #2 by Jdubs Jul 21 ’15 at 12:55

    [#1]: What would be an example of doing it that way?

    Could I have user enter in Account Number, and then the teh rest of the Columns are Lookup Columns that are filtered based on the Account Number?

  • rostislav
    rostislav
    Moderator
    Member for: 4 years 7 months 4 days
    #3 by rostislav Jul 22 ’15 at 10:50

    [#2]: Yes, you could.

    If you have the Cross-site lookup plugin, see http://formsdesigner.blogspot.com/2013/07/cascading-drop-downs-with-cross-site.html
    If you want to use pure SP lookup field, see http://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns

Displaying 1 to 3 of 3 messages