Dynamic Forms for SharePoint Introduction: Alexander Bautz has written several add-ons for SharePoint that make it possible to do advanced development in SharePoint without advanced programming knowledge. His add-ons (Dynamic Forms for SharePoint, Cascading Dropdowns and vlookup) greatly extend the capabilities of SharePoint for power users. Alex s website can be found at http://spjsblog.com/2013/08/12/dynamic-forms-for-sharepoint-v3/. Note: This manual refers to the use of Dynamic Forms for SharePoint in 2010. It should also work for SharePoint 2013. Some adaptations may be needed for SharePoint 2007. Those adaptations are not within the scope of this manual. The manual was prepared on a desktop computer running the Windows 7 operating system. DFFS can be used on any operating system, but the instructions for downloading and uploading files might be different based on your operating system. Table of Contents Dynamic Forms for SharePoint... 1 Chapter 1: Installation... 2 1.1 Advanced users... Error! Bookmark not defined. 1.2 Basic users: get the supporting files... Error! Bookmark not defined. 1.3 Basic Users: adapting the files to your site... Error! Bookmark not defined. 1.4 Basic Users: installing the files in your site... Error! Bookmark not defined. 1.5 Installing DFFS on a default New, Edit or Display form... Error! Bookmark not defined. 1.6 Installing Vlookup with DFFS on a new, edit or display form... Error! Bookmark not defined. 1.7 Installing Vlookup standalone on a list view... 6 Chapter 2: DFFS Basic Configuration... 2 Chapter 3: DFFS Advanced Configuration... 6 Chapter 4: VLookup Basic Configuration... 6 Chapter 5: VLookup Advanced Configuration... 8 Chapter 6: Ideas for Use... 8 Chapter 7: Creating a fully functioning business system... 8 Chapter 8: Appendices and Miscellaneous (optional reading)... 8 8.1 Appendix 1: How and why to show file extensions in Windows Explorer... 8 8.2 SharePoint Is An Operating System... 8 Page 1 of 9
Chapter 1: Installation 1.1 High Level Overview. 1.1.1 At a high level, installing DFFS on a SharePoint site involves making about 9 files ( javascript, css and text files) available on a document library in a site, then adding a reference to those files on the New, Edit or Display forms of a list. 1.1.2 Detailed Installation instructions, including steps you can take while installing DFFS to test that you have taken each step correctly, can be found at http://2010.sharepointmastery.com/d/d in the folder titled Manual. Chapter 2: DFFS Basic Configuration 2.1 Configuration list setup 2.1.1 The first time you open a form on which you have installed DFFS, you will receive a message that the configuration list is missing, and you will be asked if you want to create it. Answer Yes or OK. DFFS will create a new list on your site in which it will store all your configuration settings. DO NOT CHANGE OR DELETE THIS LIST. 2.2 Create Sample lists 2.2.1 To illustrate how to configure DFFS on forms, we will create a simple phone directory application using 3 lists. This simple phone directory demonstration will use the DFFS main module as well as showing how Cascading Dropdowns and vlookup work. 2.2.2 Create 3 custom lists, as follows: (1) Name of list: Person Columns Internal Name Display Name Type of Column Special Properties Title Last Name Single line of text Required FirstName First Name Single line of text Address Street Address Single line of text City City Single line of text State State Single line of text vlookupphone Phone Single line of text DisplayName Display Name Calculated Column =[First Name] & & [Last Name] (2) Name of list: Phone Columns Internal Name Display Name Type of Column Special Properties Title PersonID Single line of text Required Page 2 of 9
Phone Phone Single line of text PhoneType Phone Type Single line of text Note Note Single line of text (3) Name of list: MxPhoneType Columns Internal Name Display Name Type of Column Special Properties Title Title Single line of text Required 2.2.3 Add the following items to the MxPhoneType list: (1) Home Phone (2) Cell Phone (3) Work Phone (4) Fax 2.3 Configure DFFS on the New Item form of the Person list 2.3.1 Click on the Add New Item button on the list (or, go to the Ribbon, List Tools/List/Form Web Parts/Default New Form). When the page opens, if DFFS is installed correctly, you will see a small grey square in the bottom left corner of the form. This is the configuration button for DFFS. When you hover over it, it will show you what version of DFFS is installed. 2.3.2 Click on the configuration button to open the DFFS configuration form. It will look something like this: 2.3.3 Each of the tabs on the configuration page is used for a specific purpose. Because you will also be creating tabs on your form, this manual will refer to the configuration tabs as pages rather than tabs, to try and avoid confusion. Page 3 of 9
2.3.4 Click on the tab to go to the Tabs page. Because it is the first time you have configured a tab for your form, you will see a link that says Configure Tabs for SharePoint Forms. 2.3.5 Click on the link and fill in the first tab as follows: A) In Tab name, enter Name and Address B) Under Visible fields and headings click on Add Field C) In the text box that gets added to the form, select the Last Name field. D) Add the First Name, Street Address, City and State fields in the same way. E) The configuration form, tabs page, will now look like this: 2.3.6 Scroll to the bottom of the form and click the Save button: Page 4 of 9
2.3.7 Your form will look like this: 2.4 Configure DFFS on the New Form of the Phone list. 2.4.1 Add DFFS to the New form of the Phone list. 2.4.2 Create a tab called Phones and add the Phone, Phone Type and Note fields. Your form should look like this: 2.5 Configure Cascading Dropdowns on the New Form of the Phone list. 2.5.1 Click the configuration button on the New Form of the Phone list. You will see a new configuration page called Cascading dropdowns. When you click on the tab for that page, you will see the cascading dropdowns link: Page 5 of 9
2.5.2 Enter the following values, then save the configuration: 2.6 Configure vlookup on the Person list *** 2.6.1 Click the configuration button again, then select the Tabs page, and create a second tab by clicking the New link in the bottom right hand corner of the first tab setting section: Set the tab name to Phone Numbers, and add the field Phone and click the Save button. 2.7 Installing Vlookup standalone on a list view Chapter 3: DFFS Advanced Configuration 3.1 Side by side columns. 3.1.1 On the Tab settings page of the DFFS configuration form, the boxes outlined in green at the left end of the field setting row are used for displaying multiple fields on one row on your form. If you put a row number in the empty box on the left, that field will be shown on the row you indicate. You can then choose whether to leave the field label hidden, or to have it above the field input box or display box ( Top ), or beside it ( Left ). 3.1.2 HINT: if you want multiple fields per row, and you want your fields to line up vertically (much prettier that way), use the same number of fields per row, and use the Hidden or Top setting for the field label. Chapter 4: VLookup Basic Configuration 4.1.1 Make sure the version of vlookup loaded in your site is correctly referred to in the CEWP on the Display or Edit form where you want the link to the child items to appear. 4.1.2 On the parent list, create a column with an internal name that begins with vlookup. After the column is created, you can change the display name of the column. For example, if you are creating a Parent list and a Child list, on the Parent list you might call your column vlookupchild. Page 6 of 9
4.1.3 On the child list, create a column to hold the ID of the related item on the parent list, such as ParentID. This can be a single line of text type field. 4.1.4 Go to the Edit or Display form of the parent list and go into the Dynamic Forms configuration form. Click on the vlookup tab. 4.1.5 Click configure vlookup 4.1.6 When asked if you want to setup the configuration list for vlookup, say Yes/OK 4.1.7 The vlookup configuration form looks like this: 4.1.8 Put in the Display name or GUID of the child list. If using a GUID, include the curly braces. Put in the base url of the site where the child list exists. 4.1.9 Under Build Query, put in the internal name of the field you want to use on the child list to look up the records related to the current item on the parent list. 4.1.10 You can choose a sort order in Order By. Use the internal field name, not the display name. 4.1.11 In ViewFields, list the internal name of the fields you want displayed on the child form, and the display name for each field. 4.1.12 The InURL setting is used to set a value in the child item. The first input defines which field in the parent the info should be pulled from. The second input defines the field in the child item where the info from the first input should be inserted. The checkbox after the second input lets you hide the selected field on the child edit form, so the user won t be tempted change it and break the relationship. In order for this to work, you will need to have the Bautz code loaded on the New form on the child list, unless you are only trying to set the Title field in the child form. 4.1.13 On the tab of the Edit or Display form on which you want the child records displayed, insert the vlookup field. Page 7 of 9
Chapter 5: VLookup Advanced Configuration 5.1 Installing vlookup on a view of a list 5.1.1 VLookup can be used on a list view if desired. In order to do so, the JQuery, spjs-utility and vlookup_sp2010-2013 files must be referenced on the page. 5.1.2 The first time you access the list view with the files referenced, the setup page will open. To get BACK to the setup page, try http://2010.sharepointmastery.com/p/template/lists/person/editform.aspx?id=1&vlook upsetup=1. Not sure yet whether this works if DFFS is not set up on the Edit Form itself. Chapter 6: Cascading Dropdowns 6.1 Getting the configuration tab to appear. 6.1.1 When you first install the DFFS files on a form, the tab for configuring cascading dropdowns may not appear in the DFFS configuration page. Save the DFFS configuration and the Cascading dropdowns tab should appear the next time you open the DFFS configuration page. Chapter 7: Ideas for Use 7.1 QA system 7.1.1 In a QA system, there may be multiple fail points possible for each record being reviewed, one for each question on the audit checklist. You may also need to provide for comments for failed questions. 7.1.2 Create a control list to hold the main records, including the questions that need to be reviewed for each audited item. I like to use generic field names for the questions (eg. Q001, Q002, etc. then use the Description for the wording of the question. On the form for the Main list, I hide the labels for the questions. 7.1.3 Then create a Fail Points list to hold the individual fail point records, as there could be multiple records for each item on the control list. 7.1.4 Use vlookup to tie the Fail Point list to the main list. 7.1.5 Use Cascading Dropdowns to tie the Fail Point forms to a configuration list that holds the fail reasons for each question on the audit checklist. 7.2 Staff management system Chapter 8: Creating a fully functioning business system Chapter 9: Appendices and Miscellaneous (optional reading) 9.1 Appendix 1: How and why to show file extensions in Windows Explorer 9.2 SharePoint Is An Operating System Page 8 of 9
Version of this manual Version History Author Revision Date Revision Notes DFFS version spjs-utility version vlookup for SP201X version 0.1 Keith 2014/01/11 Initial 3.310 1.178 1.644 Hudson version 0.3 Keith 2014/03/08 3.315 and 1.180 1.650 Hudson 3.324 Notes re version history: the version numbers listed for DFFS, spjs-utility and vlookup are the versions of those files used while preparing the latest revision of this manual. If you are using a different version of these files, your mileage may vary. Page 9 of 9