September 3, 2014
Changes in v1.730:
Minor update for compatibility with DFFS v4 “direct to backend script”.
June 27, 2014
Changes in v1.723:
Added check for a function named “vlookupChildViewOrEditCallback” to detect open or edit of a child (in dialog only). Add a function with this name, and it will be called when the dialog closes.
April 29, 2014
Changes in v1.721:
- Fixed a bug from the previous version when using [URL:Key] in the CAML: NOT supplying the URL parameter generated an error.
- Changed how the debug also alerts the values set in NewForm of the child item when using ?vLookupDebug=1 in the url
April 27, 2014
Changes in v1.720:
- Fixed first column width if header row is hidden.
- png icons in SP2013 and fallback to white icon for file types not recognized.
- Added icons to show the view state of the groups (when using grouping).
- Added option to use a URL querystring variable in the CAML. Hover over the help icon for the “Build Query” or the “Write your own CAML-query” to learn how to use it.
April 21, 2014
Changes in v1.710:
If you leave all display names in the viewFields section empty, the header row will be hidden.
April 13, 2014
Changes in v1.700:
Please note that there are a number of changes in this version and there will most likely be a few new bugs. You should test it before adding it to a production environment. Let me know if you find a bug, and I’ll fix it as soon as I can manage.
- Fixed a compatibility issue with “fixQuirkyLookup” in the function “init_vLookupFields”.
- Added option for selecting whether or not to open “new child” in a dialog.
- Added “Show all option” when using “Rowlimit”.
- Added support for grouping the items.
- When using “Attachments” as viewField you will now get the paperclip in stead of “Yes” or “No” to indicate that an item has attachments.
Please note that you must index the columns you are querying to prevent errors when you reach a total of 5000 items in the list.
April 13. 2014
Changes in v1.651:
Fixed an issue with IE 11 for SP 2013: L_Menu_BaseUrl is undefined.
February 2. 2014
Changes in v1.65:
- Changed <View Scope=’Recursive’> to <View Scope=’RecursiveAll’> to fix a bug with discussions (that are in fact folders).
- Added option to refresh all vLookup columns when one has changed.
- Added option to open links in the same window, and not in a new dialog.
- Minified the code.
January 04. 2014
Changes in v1.644:
- Added L_Menu_BaseUrl and L_Menu_LCID to the script for IE 11 compatibility in SP 2013.
- Wrapped the table cell values in a div for better handling of “ViewField Special configurations CSS”.
- The “ViewField Special configurations CSS” will also be applied to empty cells.
- Fixed missing refresh in list view when a vLookup item is added or edited.
December 06. 2013
Changes in v1.640:
- A new Action: “Comma separated list” is added. See instructions on the help icon for the “Action” field.
- Custom style now works for all column types and not only text and note columns.
- Date format can now be specified in the “In URL” section. See the help icon for details.
- A few small bugfixes.
November 12. 2013
Changes in v1.631:
Child table max-height: changed overflow:scroll > overflow:auto to hide the scrollbar if it is not needed.
November 3. 2013
Changes in v1.63:
- Added option to pass an URL parameter to the child list NewForm when adding children. Hover over the help icon for instructions.
- Added option to set the max-height on the child table to have vertical scrollbars.
- Changed how the page id is calculated when storing and retrieving the configuration. In some cases it came out wrong.
October 11. 2013
Changes in v1.62:
Added the number formatting support for “Action” sum, average and count.
October 11. 2013
Changes in v1.6:
Updated the number formatting support and added separate setting for “thousandsSeparator”. You can now use one or more of the following settings: “decimals”:2,”thousandsSeparator”:”.”,”decimalSeparator”:”,”}
October 06. 2013
Changes in v1.59:
- Fixed set multichoice column from URL.
- Added automatic refresh of the vLookup table when editing a child.
September 16. 2013
Changes in v1.56: Fixed a bug regarding showing documents located in sub folders in a document library.
September 10. 2013
Changes in v1.55:
- Fixed a bug regarding multi choice people pickers.
- Changed the available “events” you can use.
Interaction / events (put code in the CEWP)
// If defined, this function is called when clicking on "add new child". This function must return true to allow for children, or false to disallow.
// check something and return false if conditions are not met
// If defined, this function is called for each of the fields set in the child from the "In URL" setting.
// do something
// If defined, this function is called when a vLookup column is rendered complete.
// do something
// If defined, this function is called when a child is added and you close the dialog with "OK".
// Do something
// If defined, this function is called when you click "add new child", but close the dialog without saving.
// Do something
August 28. 2013
Changes in v1.53:
- Fixed bug in multiselect viewfields (checkboxes, multilookup and multiuser)
- Added rowlimit setting for the query.
- Changed some ids and variable names in the code.
This solution lets you create relationships between two or more lists based on for example a lookup column connection. You can list all children in the parent element (the children has a lookup column targeting the parent). This is not possible out of the box in SharePoint.
You can also have any kind of dynamic query based on values in the current form. You can for example pull in information from a list based on a selection in a choice column. Please note that this last example will not pull in this information on the fly when changing the selection, but when the form is loaded in DispForm, EditForm or in a list view.
This solution also lets you create new children from the parent (both DispForm, EditForm and in list views), and lets you auto-populate the “connection” to the parent element to ensure a connection.
Image from the GUI
I have previously posted two articles in this series:
vLookup for SharePoint 2010
vLookup now supports SharePoint 2013
This one is done mainly for compatibility with the Dynamic Forms for SharePoint solution, but I have redone the code and also fixes a few bugs and adds some new features:
- The creation of the configuration list is now triggered when you first enter the setup. This is done to prevent some rare bugs where the list is not detected onload, thus asking to create it despite it already exists.
- The heading for number columns are now aligned right (as the values)
- Fixed bug where exiting the setup did not load the form with its item-ID.
- Added custom css for the viewFields. Hover over the help icon to the right of the “ViewFields” section for details.
- Added option to enter a license code to remove the PayPal-logo in the top of the GUI
Used with the Dynamic Forms for SharePoint solution
Refer this solution in the CEWP where you set up the DFFS solution (DispForm and EditForm) like this:
<link type="text/css" href="/Scripts/DFFS/default.css" rel="stylesheet">
Used as a standalone solution in forms or list views
To use this as a standalone solution, you must do the configuration in the CEWP code like this:
Please note that the setup must be MANUALLY triggered the first time. Set up the scripts, create the vLookup column and then – in DispForm – add this to the URL to create the list:
/Lists/mylist/DispForm.aspx?ID=[an existing ID in your list]&vLookupSetup=1
Refer the previous articles in this series for further details on the setup process.
Get the code for the file “vLookup.js” here.
How to remove the PayPal-logo / Unlicensed version from the GUI?
In this version I have added support for providing a license code for removing the PayPal-logo and displaying a “Registered to” text in stead. To obtain a license code, go to this page, scroll down to “Dynamic Forms for SharePoint / vLookup for SP201X” and follow the instructions.
Please post any bugs or comments below.