DFFS and plugins: Change log

This page shows the complete change log for Dynamic Forms for SharePoint and DFFS plugins (vLookup has a separate change log for older changes).

October 17, 2017

Changed files in this release:
/DFFS/js/DFFS_backend.min.js
/DFFS/js/DFFS_frontend.min.js
/DFFS/css/DFFS_backend.css
/DFFS/css/DFFS_frontend.css

/DFFS/plugins/SPJS-vLookup_frontend.js
/DFFS/plugins/SPJS-vLookup_backend.js
/DFFS/plugins/SPJS-utility.js
/DFFS/loader/DFFS_loader.html

vLookup v2.2.105

  • Fixed an issue where the “Add new” button wasn’t clickable unless you hit the text inside the button (it’s not really a button element).
  • Changed the order of the “Save”, “Cancel” and “Delete” buttons in the vLookup configuration.
  • Fixed a bug where the “vLookupPresetFromUrlDone” function would not be called when setting a lookup column in a vLookup child item added from DispForm or EditForm of a parent form.
  • Fixed a bug where the upload button you see when hovering over a folder in a vLookup table had an error in the url to the Upload.aspx page if the folder was not in the root of the document library.

SPJS-utility.js v1.312

  • Added support for querying external lists with custom queries using spjs.utility.queryItems. This would previously not work if the external list didn’t user a column named “ID” as primary key. In this new version you can speciy the primaryKey in the argument option like this example:
    <code>
    spjs.utility.queryItems({
    “listName”:”EXTERNAL_LIST_DISPLAY_NAME”,
    “query”:”<Where><Eq><FieldRef Name=’AddressID’ /><Value Type=’Text’>447</Value></Eq></Where>”,
    “viewFields”:[“AddressID”],
    “primaryKey”:”AddressID” // this must name the column that holds the primary key in the external list
    });
    </code>
  • Fixed an issue where a people picker that was set as readonly would not properly show the resolved username when using setFieldValue to set the people piker value.

DFFS v4.4.3.16

  • Fixed a bug with using the triggers “is changed from initial value” and “is changed” on multichoice columns. The problmen was that the trigger only fired when changing the first option.
  • Removed the setting for accordion slide time from the DFFS backend config for “Expand and collapse” because it no longer was in use.
  • Fixed a problem introduced in v4.4.3.12 with loading a form with collapsed headings.
  • Fixed a problem introduced in v4.4.3.12 where the setting “Stretch side-by-side fields over both form columns (hiding the field label)” didn’t work in the first tab.
  • Changed how the check out functionality in the Misc tab when editing the DFFS config for EditForm. You can now leave the “You must check out label” empty to automatically check out the item without an alert. This applies to the “Keep checked out label” – leave it empty to hide it. I have also added support for reversing the check out of the item in case the use hits Cancel after opening the item in EditForm.
  • When using SetFieldValue from a rule to set a cascading dropdown, the subsequest dropdowns would not be properly set even if the setting “Autofill subsequent dropdowns when they contain only one valid option” was checked.
  • Fixed some issues related to resizing of the modal dialog when opening the form, expanding headings and vLookups or changing tabs. Also, changed the Misc settings for height and width under “Dialog position and size” to specify minimum height and width instead of maximum widht and height.
  • Set a 500ms delay before triggering emails when saving the form to ensure changes to PeoplePickers are updated before trying to get the value for “To” and “Cc”.
  • Added option to download the list of fields in the “Fields” tab in DFFS backend as comma separated values (CSV).
  • Added notification of possible circular reference in the “Set field value” section in a rule if you try to set the value of the field used as trigger for this rule. In this case you could end up with a rule triggering itself over and over agiain.
  • Added back the option to set a custom value in a choice field using “Set field value” in a rule. This went missing when I changed this to show a list of options for all choice and boolean fields.
  • Added a 100ms timeout to prevent a rule triggerin on change of a multichoince field from triggerin the rule on every option in the field.
  • Added better debug output on linked rules to include the name of the rule triggering it (when using “Let linked rules trigger the parent rule on change”). It will also show if the rule was called manually from code.
  • Fixed an issue with SP 2010 where the link to open list settings form the “Fields” tab would not work.
  • Fixed a bug when using the Misc tab setting “Split tabs in multiple rows” under the “Tabs” heading. In this case, only selected tabs on the last row was “styled” as selected when clicking on it.
  • Changed DFFS backend to fit the config on smaller screens without haveig to scroll sideways.
  • Fixed a bug in DFFS backend when cloning rules with trigger on a choice column. In this case, clicking the label and not the actual checkbox of a choice option in the “This value” section would click the same option in the rule this one was cloned from. This issue only occurred when the rule was “freshly cloned” and it would work correctly after a reload.

August 17, 2017

DFFS v4.4.3.10

  • Fixed some bugs in handling “is not equal to” triggers on multichoice fields.
  • Fixed a few issues in the debug ouput where some of the output did not properly show the rule label.
  • Added option to turn off the “Save and redirect” in NewForm when you add an item from a vLookup field in a parent list.
  • Added support for editing Custom JS and Custom CSS in fullscreen mode. You find the new option in the heading above the textarea.
  • Fixed a bug where disabled rules had white text on white background.
  • Fixed a bug with the “Hide elements that doesn’t match” when filtering in DFFS backend in tabs or rules.
  • Fixed a bug in the change trigger on people pickers.
  • Fixed an error when using “Clone” on a rule and trying to select “And” or “Or” in the “This value” field, “Save item button visibility” or “Edit item button visibility”. In this case, these radiobuttons would be interfering with the selection in the same group in the other rule. This would be fixed when you save the form and reload DFFS backend, but could cause some confusion when you cannot properly check the correct option.
  • Changed the timestamp in the top of the screen in DFFS backend to show “last saved” and not “load time” as before.
  • Fixed a bug with DFFS when using content types and having a tab with a field not in the current content type as first field in a tab. In this case, the tabs row wold be drawn at the bottom of the form.
  • In the “Rules” tab: moved the warning icon for rules disabled in the current form to the rule label like the icon for “Hide this tab in” in the “Tabs” tab.
  • Fixed an issue from the latest BETA (v4.4.3.8) where the debug output panel would always show if you had rules on a multichoice field.
  • Fixed an issue in the “Set field value” section in a rule where you would get a “not found” message if you saved the form with an empty placeholder for a set field action.
  • Fixed a problem with the detection of save conflicts when two users try saving the same form config in DFFS backend. In the previous version, this check only worked when using versioning in the configuration list.
  • Added a new trigger “The form is initiated” this can be used for example to set the base required fields when loading the form. Please note that the “The form is ready” rule will trigger LAST – after all other rules and therefore cannot be used like the new “The form is initiated” rule.
  • Changed the detection of {viewitemlink} and {edititemlink} in DFFS email templates as this had an inconsistent mix of upper and lower case characters. It will now accept all cases of letters.
  • Fixed a problem with triggers on change of a text field when using a custom rule to reset a changed field back to the default value with “setFieldValue”. In this case, the “change tracker” will not be properly updated and therefore it will not trigger if the user tries to change the text to the same value one more time. Please note that this change is made in SPJS-utility.js and you must therefore update this file to fix this problem.
  • Fixed an issue with “spjs.dffs.allChangeTracker[data.triggerField].push(…” when shareing a NewForm or EditForm form config with DispForm.

SPJS-Utility.js v1.308

  • Changed the jQuery.ajax call in the internal function “spjs.utility.wrapSoap” to use .done() and .fail() instead of success and error.
  • Added console.log output (if console is open) when the “spjs.utility.queryItemsThrottled” fails due to a bad request. This change has been added to give better error messages in case the spjs.ac plugin is configured wrong.
  • Fixed a problem with DFFS triggers on change of a text field when using a custom rule to reset a changed field back to the default value with “setFieldValue”. In this case, the “change tracker” will not be properly updated and therefore it will not trigger if the user tries to change the text to the same value one more time.

vLookup frontend v2.2.102

  • Changed the “No items found” label so it won’t show initially when the query hasn’t yet finished.
  • Changed the “spinner” show when loading a vLookup field to use a CSS spinner and not an image. In case you have overridden this image in Custom JS in DFFS, you must change it to include the full image tag and not only the path to the replacement image.
  • Added a fallback to the old “spinner” image if used in SP 2010.
  • Fixed a bug from last BETA where the “No items found” message was missing in Internet Explorer due to a typo in the HTML code (Chrome fixed it on the fly, but IE failed).
  • Added a new “Loading…” label to vLookup that show when the vLookup field is rendering. This can be overriden in the Custom JS in DFFS like the below example. The reason for not adding it to the vLookup config is because it must show before vLookup has loaded.
spjs.vLookup.data.loadingLabel = "Your custom loading label...";
  • Changed the message box layout when saving vLookup to match the new layout from the rest of DFFS.
  • Fixed an error in the saving of DFFS in case you opted to save the DFFS config in the prompt after saving the vLookup config. This call addressed the old name of this save function and would throw a console error and not save the form. You could however save the DFFS config with Ctrl+S or with the normal save buttons in the DFFS GUI.
  • Fixed a problem with missing dialog resize when minimizing an expanded folder in a vLookup child table.

SPJS-AC v1.6.14

  • Fixed an issue with using REST queries (in SP2013+) when using the “userREST” switch and more than one searchField. In this case, there would be some unnessesary queries runnign when filtering. This could cause errors or cause some options not showing when searching on multiple keywords separated with space.
  • Fixed an issue with using REST queries (in SP2013+) when using the “userREST” switch and only one searchField. In this case, the retrived data would not be in the same format as it would when using more than one searchField. Basically, peoplepickers and lookup columns would not be returned as objects, but as plain text.
  • When not using the “userREST” query option (or when in SP version lower than 2013) the AC plugin would not correctly return matches when the initial query has been performed and the user continues to type in the AC input field.
  • Catched a few more errors in case the plugin is not configured properly, and for example tripps the “5000 items limit”. In this case, you will se an error in the AC field in the form.
  • Fixed an issue with using the “listOptionsOnFocus” where the dropdown would not hide unless you selected an option.
  • Fixed a few issues where clearing a selection, or loading an invalid selection in EditForm would not clear the “setFields”.
  • Fixed an issue where the “No items match your search” would not hide when clicking out of the ac-field.
  • Fixed an issue with clicking in the AC field, but not changeing the value would re-run the query.
  • If you use a date column in the “optionalDetailFields” it would show the date in this format: yyyy-mm-ddT00:00:00Z (ISO8601). I have now added a parse function that show locale date format.
  • When using the “useREST” setting in SP 2013 the setFields now accepts “PeoplePicker/Name” when setting a people picker in the current form. The “optionalDetailFields” also accepts this format.

SPJS-Lookup v1.1.9

  • Debug output did not show the filter CAML because it did not escape the < and >

July 31, 2017

Changed files in this release:
/DFFS/js/DFFS_backend.min.js
/DFFS/js/DFFS_frontend.min.js
/DFFS/css/DFFS_backend.css
/DFFS/css/DFFS_frontend.css
/DFFS/plugins/SPJS-ac.js
/DFFS/plugins/SPJS-casc.js
/DFFS/loader/DFFS_loader.html

DFFS v4.4.3.7

  • Changed the load time output in the console so  it will no longer be printed in full every time. You get instructions on how to show the output – basically by typing this in the console:
spjs.dffs.showLoadTime()
  • Fixed a bug related to using the same email template name in NewForm and EditForm when using the “Save and redirect to EditForm” functionality. In this case, the email in EditForm would not be sent as it was mistakingly interpreted as an attempt to send a duplicate form the same form.
  • Fixed an error that broke the DFFS backend for older versions of Internet Explorer.
  • Fixed an issue with rule debug output in IE 8 where click on the “arrow” would not properly expand the debug information. Please note: IE mode of IE5 or IE7 will NOT show the debug output properly due to missing CSS selector support (I haven’t made any efforts to fix it).
  • Fixed a few layout issues for Side-by-Side configuration in IE 5 mode on SP 2007 where the CSS styles from Custom CSS would not work properly.
  • Fixed a few layout issues for DFFS backend when using IE 5 mode in SP 2007.
  • Fixed an issue with debug output showing empty heading for rules where “no reverse” was configured.

SPJS-Casc v3.7.9

  • Fixes an issue where one of the values in the array was “undefined” and broke the script with a “split of undefined” error.

SPJS-AC v1.6.11

  • Fixed a bug withe “Add new” when using REST queries in SP 2013+. In this case, the autocomplete would not properly show the newly added option in the search result.
  • Fixed a bug where the “setFields” would not be cleared when clearing the value in the Autocomplete input.

July 23, 2017

DFFS v4.4.3.6

  • Removed console.group on the load time tracker as this broke in IE8 mode.
  • Added search field in tabs and rules in DFFS backend to find textareas or inputs where a text string has been uses.
  • Changed the sort order to descending by date of modification and also preveted accidentally deleting a live config.
  • When crating a new restore point: changed so that the note you add in the “Please give a short description of this restore point” will be prepended to the current “Note to self” from the “Export, import and restore” tab.
  • Fixed an error in the change event trigger on a lookup column.
  • One new improvement in the loading of custom js files in the Custom JS tab. Based on the feedback I have gotten, this will now properly work in most cases. Keep in mind that the files loaded in the “Load these files before executing the Custom JS” will load asynchronously and you cannot be sure that the first one loads before the last one. Therefore you must add the code that “uses” the loaded files in the Custom JS textarea as this will be initiated last. You can also concatenate all your external files in one file to ensure all dependencies have loaded before you use them.
  • Fixed text and input / textarea colors in DFFS backend when you use a dark theme with base text color white. Fixed the same in dialogs in frontend.
  • Fixed an error in “Return to DispForm when editing an item and NOT opening the form in a dialog” in the Misc tab in DispForm configuration. If checking the checkbox, the setting would be saved, but when entering DFFS backend again, it fails to set the selected state of the checkbox and on save it will therefore be cleared. This bug has been there a long time (not sure exactly which version it occurred in).

SPJS-AC v1.6.9

  • Fixed an error that prevented the autocomplete from setting a people picker properly when using it in SP 2007 with IE in IE8/9 mode.

July 17, 2017

DFFS v4.4.3.5

Important information:

  • Due to changes in SharePoint online related to how AMD modules (scripts compatible with require.js) are registered, I have been forced to change the loading of custom script files in the Custom JS in DFFS.If you load an AMD enabled module and want to use this code in the custom code you have written in Custom JS, you need to wrap the code in a “require” function like this:
    require(["module_name"], function(module_name){
    // add the code using "module_name" here
    });

    I have added some more information in the Custom JS tab.

  • Fixed a bug with using a boolean (Yes/No) field as trigger on unchecked / false state.
  • Changed some internal functions to speed up loading of forms with a large number of fields. Please note that this involves removing a “wrapper” of fields and this might affect some custom css rules if you have used the class “dffs_tdWrap”.
  • Fixed a bug with using a custom function as trigger on load.
  • Enabled some redirect functionality that was previously disabled in SharePoint 2007.

SPJS-Casc v3.7.8

  • Fixed a bug with using the same value in the first two levels of a three level cascading dropdown. In this case, the filtering of the third level would fail.

SPJS-AC v1.6.8

  • Fixed a bug with setting people picker fields in SP2007.
  • Fixed a bug where the setFields were run two times when using arrow keys and enter to select an item in the dropdown.

July 10, 2017

DFFS v4.4.3.3

  • Fixed a problem with loading custom js files in the Custom JS tab in SharePoint online. This issue is related to the use of require.js in SharePoint online, and the latest changes made to DFFS to use jQuery.noConflict() broke the compatibility. What I have done now is to use requrie.js to load all custom files added to the top of the Custom JS tab. In SharePoint online I use the built in version of require.js, but in SharePoint 2007 and 2010 I load the require.js file from the new folder added to DFFS: “/SPJS/DFFS/require/require.js”.Please note: If you use SharePoint 2007 and plan to load files in the Custom JS tab, you must add a new variable “spjs_path” to the “DFFS_frontend_CEWP.html” file that points to the current DFFS folder like this:
var spjs_path = "/Sites/YourSite/SPJS/DFFS";
  • Changed the “Switch form” buttons in DFFS backed to have all visible at all times, but disabling the one for the form you are currently configuring.
  • Fixed an issue with the new “Browse restore point and deleted configurations”. If you permanently deleted one of then, closed the dialog and reopened it, the item you had deleted was still listed. Because it was actually deleted, deleting it agains would pop up an error message and freezing so you couldn’t close the dialog.
  • Fixed a bug where the operator select on rules fails to set options as “disabled”. Depending on the trigger type used in rules, some of the operators in the dropdows should be disabled. This doesn’t always work so you may end up with the ability to select a operator that isn’t actually valid for that trigger.
  • Fixed a bug where the “Only if the field is empty” checkbox on the “Set field value” section in a rule failed to save with the configuration – effectively overwriting the previous value in the field in the rule was triggered.
  • Fixed an error in the console when selecting a field in the rule config for “Optional fields”, “Required fields” etc.
  • Added back the missing “is not equal” operator on multichoice fields.
  • In the previous version I changed the default tooltip icon from the built in “/_layouts/images/hhelp.gif” to a Unicode character. Unfortunately this Unicode character wasn’t available in all platforms – effectively rendering the icon as a square. I have added a new default tooltip icon in the next release.
  • Fixed a bug preventing rules triggering on multiselect fields from working in DispForm.
  • DFFS_loader: Some small changes to ensure DFFS don’t overwrite an existing jQuery version loaded before DFFS.
  • DFFS Installer: Fixed an issue with the new “Custom folder” installation method where the overlay and loader file was loaded from the current “DFFS” folder and not from the custom folder specified.

SPJS-Utility v1.3.0.6

  • Fixed a problem with setting multiple values in a multi lookup columns one after the other. This would not work and effectively only setting the first value. You could pass an array of values to set multiple values, but not for example use a multiselect autocomplete field to write all selected values to a hidden multi lookup column.

vLookup v2.2.99

  • Added new {“totalsType”:”count”} option. See help text in the totals section in vLookup backend.
  • Added new checkbox to control the visibility of the new “Grand total” functionality for grouped vLookup views.

SPJS-AC v1.6.7

  • Fixed an issue with using the AC field as a trigger. In this case the rule would not always trigger when the field was changed.
  • Fixed an alignment issue with the red X when using multi select and long values in the select.
  • Fixed a problem with resolving the value if you typed the search value to fast so that the search was performed within 500 ms of the field being ready.

June 25, 2017

Please note that the user manual hasn’t been updated yet. All changes are listed below, but I’ll do my best to update the manual within a few days.

DFFS v4.4.3.0 (June 25, 2017)

  • Rebuilt the triggers for choice and multichoice fields to show a list of options to select from instead of typing in the options in a plain text field. Because you select the actual choice options I have removed all other operators than “is equal to”, “is changed from initial value” and “is changed”. Please note that this might require that you redo the rules triggering on multichoice fields.
  • Added option to test load a new version of DFFS by putting the new version in a folder named “DFFS_NEXT” in the SPJS library, and adding “DFFS_NEXT=1” to the URL when loading the DFFS form like this (please note that this will only work when upgrading beyond v 4.4.3.0 ):
/sites/Your_Site/Lists/DFFS_TestList/NewForm.aspx?DFFS_NEXT=1
  • Fixed an issue with space in the URL being encoded as %2520 (because it was escaped two times) when using {viewItemLink}  and {editItemLink} in DFFS emails.
  • Fixed an incompatibility when upgrading from an older version where you would get an error in the console like “Cannot read property ‘join’ of undefined” related to “objArr.accordion”.
  • Fixed an issue with using the “Switch form” buttons in DFFS backend and having duplicate heading IDs. In this case you would be redirected, but the form would NOT save – effectively loosing current changes.
  • Added support for creating restore points. You can later browse restore points and any deleted configurations to restore then into one of the forms in the same list. This functionality has been put in a new tab “Export, import and restore” along with the Export and import functionality that has been moved from the Misc tab. Please note that you can only restore configurations saved after upgrading to v4.4.3.0.
  • When you press Delete in the DFFS backend to delete a config, it is backed up and you can restore it later from the “Export, import and restore” tab.
  • Fixed an issue with triggering on an empty people picker in SP 2010.
  • Fixed an issue where you couldn’t disable a trigger on “The form is saved”.
  • Added support for doing basic calculations in the “Set field value” section in a DFFS rule. You can use “+”, “-“, “*” and “/”. See help icon in DFFS backend.
  • Changed rules for Boolean triggers to show a checkbox and not an input field. This means you no longer adds “true” or “false”, but checks or unchecks the checkbox to set the trigger value.
  • Fixed an issue when you in a dialog click “Save and redirect” and then “cancel” IN THE NEW FORM . This would open a blank DispForm on save.
  • Added support for redirecting from EditForm to DispForm in the Misc tab.
  • Rebuilt the debug output to show color coded outputs (green = rule match, red = no match).
  • Changed the parsing of variables included with {var:nameOfVariable} to strip away whitespace to prevent errors if the person editing the DFFS configuration accidently adds a whitespace.
  • Changed all dialogs in DFFS backend to use a script generated alert box. If you like to use it in Custom JS you can call it like this:
spjs.dffs.alert({
    "title":"The dialog title",
    "msg":"This is the message - you can use HTML",
    "ok":function(){
       alert("You clicked the OK button - add you custom OK button code here.");
    },
    "okBtnLabel":"This is the OK button label", 
    "cancel":function(){
        alert("You clicked the Cancel button - add your custom Cancel button code here.");
    },
    "cancelBtnLabel":"This is the Cancel button label"
});
  • Fixed an issue with using an empty date and time column in the “Send date” of a DFFS e-mail. This would throw an error, but will now send the e-mail right away.
  • Added option to add field, heading or HTML section in-between existing fields in a TAB. Go to the “Tabs” and hover the mouse over one of the fields in the tab – notice the + below to the left. Click this plus to bring up the menu to add a new field, a heading or a HTML section below the current field.
  • Added new setting for tabs where you can set “Hide this tab in” for use when cloning a form config from for example EditForm to NewForm.
  • Added option to compare a date in a trigger with {Created} or {Modified}.
  • Fixed an issue in Tooltips where a MUI setup with <br> in the HTML would incorrectly be translated to “\n” when loading the config in DFFS backend – this would throw an error when attempting to save an you would have to manually change it back to <br>.
  • Added option in the Set field value section in a rule to set a date and time column to “now” like this:
  • [today]#now
  • Fixed an issue where a read-only representation of a choice column in NewForm or EditForm where you have the options set up side-by-side (in the Misc tab) would not be in the same side-by-side layout.
  • Fixed a few incompatibilities with SharePoint 2007. Also updated the CEWP code for use in SP 2007 with an example on how to set the “_spPageContextInfo.pageListId” for multiple lists.
  • Changed the loader and installer (local version – not the APP) to support DFFS files located in “current” site, “parent” site or “root” site.  I have changed the variable “spjs_scripts_in_current_site” to: “dffs_folder_location”. You can use “current”, “parent” or “root”.
  • Updated the “local installer” to give some more information about the location of the DFFS files when installing in a list / library.
  • Changed the how a custom function used in “Linked rules and functions” are handled. Previously this would only be evaluated on load, and use the result also on change. This is changed to evaluate the function on change an on load. Also, the “Rule friendly name” will be passed to the function as an argument.
  • Added option to minimize all disabled rules in the top of the “Rules” tab.
  • Added option to load different versions of DFFS in different lists in the same site. To do this, add a custom version of DFFS with a new folder name – like DFFS_yyyy-MM-dd to the SPJS library, and specify this folder name in the DFFS Installer (currently only the local installer has this feature). This is a great way to upgrade to a new version of DFFS one list at the time.

vLookup v2.2.98 (June 25, 2017)

  • Changed how numbers are truncated when using “decimals” in the special configuration settings. Earlier version would just truncate the number,  but now it will round up the number and truncate it with the “toFixed” method.
  • Fixed an issue with “Show more” where you would get the “Show more” link when using a paging of for example 10 items even if you there was only 10 items in total.
  • Fixed a problem with DFFS redirect not working when adding or editing a vLookup child item in a dialog.
  • Added a new function to use in custom code to reload a vLookup.
spjs.vLookup.refresh("YOUR_FIN") ;
  • I have also changed how the CAML pulls in variables from [currentItem:FIN] to make this “live” – reflecting the changed value in the field (previously it was only pulled in on load and was static).
  • Added option to have a “grand total” when using totaling and have the vLookup table grouped. The grand total will show at the bottom of the vLookup table – below the groups. There are a new field for adding the grand total heading in vLookup backend.

SPJS-AC v1.6.5 (June 25, 2017)

  • Added support for REST queries in SP 2013+. To use REST you must set the key “useREST” to true.
  • If you use REST you can add a filter in the “RESTFilter”. For example, this to get all items where Title starts with the letter “t”:
startswith(Title,'t')

You can use a function to return the filter value – for example like this:

Title eq {function:yourCustomFunction}

Then add this function in the Custom JS:

function yourCustomFunction(){
    return getFieldValue("AnotherFieldInYourForm");
}
  • Please note that if you plan to filter “live” by a dynamic filter value (by for example using the value from another field as input to the filter) you can only use one field in the “searchFields” array.
  • New functionality for SP 2013+ when using “useREST” and multiple “searchFields” the complete dataset will be retrieved before the field is rendered. This way your search will be faster.  If your dataset is large and it takes to long to load it, please use one “searchField” to speed it up. You can concatenate multiple search fields in one single line of text field and use this as “searchField” to speed up the search and still search in multiple columns. Unfortunately using a calculated column will NOT work due to restrictions in the SharePoint REST api. Please note: when using REST you must use this format when setting a people picker in the “setFields” section: PeoplePickerFieldName/Name.
  • Fixed a bug in the autocomplete for people picker fields in SP 2007.
  • Fixed a bug in re-validating a field on load in EditForm where this sometimes would fail and show a red “square” and forcing the use to reselect the item.
  • Added “debug” option to the function call.

Example function call:

spjs.ac.textField({
 "applyTo":"",
 "helpText":"",
 "loadText":"", //Used with large REST datasets in combination with multiple searchFields to show a message when waiting for the data to load
 "listGuid":"",
 "listBaseUrl":"",
 "showField":"",
 "searchFields":[], // Array of fields to search in
 // Prefilter - use this OR filterREST
 "filterCAML":"", // You can use {function:yourCustomFunction} to get a "live" filter value for each search
 // Prefilter for SP 2013 and up - use this OR filterCAML
 "useREST":false,
 "filterREST":"",
 "optionDetailFields":[], // Additional fields to show in the dropdown
 "optionDetailPrefix":[], // Optional prefix for the fields in "optionDetailFields". The length of this array must be the same as "optionDetailFields".
 "enforceUniqueValues":true,
 "rowLimit":15,
 "listOptionsOnFocus":false,
 "minLengthBeforeSearch":3,
 "reValidateOnLoad":false,
 "allowAddNew":true,
 "isLookupInSelf":false,
 "addNewAdditionalFields":[],
 "multiselect":false, 
 "multiselectSeparator":"; ",
 "orderBy":[],
 "setFields":[],
 "debug":false
});

SPJS-Utility.js v1.305 (June 25, 2017)

  • getFieldValue in DispForm now properly gets the HTML from a rich text field.
  • Fixed an issue with setFieldValue on taxonomy where a value with a comma would incorrectly be parced as two separate entries (and fail on validation).
  • Fixed an issue where setting a lookup column in a rule or using “setFieldValue” would be delayed with a setTimeout for 1500 milliseconds causing a problem when setting this lookup on pre save (the value would not always be saved).
  • Added a function to get a list (to get the list GUID) by the list URL name. This function can be used like the below example. Please note that this function is asynchronous so you must call the function using the ID inside the “callback” function :
spjs.utility.getListByRootFolder(
 {
 "listBaseUrl":makeAbsUrl("/DFFS"),
 "listUrlName":"TheListURLName",
 "callback":function(list){
 console.log(list.Id);
 // Use the list.Id to call your custom function
 }
 }
);
  • Fixed some incompatibilities with SharePoint 2007.

SPJS-Casc.js v3.7.6 (June 25, 2017)

  • Added support for setting the multichoice selects side-by-side in the DFFS configuration tab or in custom code by adding “sideBySide”:true.
  • Fixed an issue where only the first level would show when loading a cascading dropdown set with invalid options selected in EditForm.
  • Added support for using a predefined array of objects as datasource for the cascading dropdowns. This would be preferable when using multiple instances of spjs-casc in the same form to avoid running the same query multiple times. To use this option, you must NOT use the DFFS tab “Cascading dropdown”, but add the function call to the Custom JS like this:
var res = spjs.utility.queryItems({"listName":"CascInitialFilterSource", "query":"<Where><IsNotNull><FieldRef Name='Title' /></IsNotNull></Where>", "viewFields":["Title", "FieldValue", "LookupValue"]});

var dataSource = res.items;

You can use a REST call if you like, but ensure the “dataSource” is an array of objects like this example:

[
 {
 "Title":"Item #1",
 "Value":"Some value"
 },
 {
 "Title":"Item #2",
 "Value":"Another value"
 }
]

Use the “dataSource” like this:

// #1
spjs.casc.init({
 "manualMode":true,
 "dataSource":dataSource,
 "lookupList":"", // not used when dataSource is defined
 "lookupListBaseUrl":"", // not used when dataSource is defined
 "lookupListFields":["Title","Value"],
 "thisListFields":["CustomField1","CustomField2"],
 "dropDownDefaultvalue":"Select...",
 "filter":{"filterField":"Title","filterValue":"YourFilterValue","operator":"eq"},
 "hideEmptyDropdowns":false,
 "autoselectSingleOption":true,
 "clearInvalidSelection":false,
 "addOwnValue":false,
 "addOwnValueMouseover":"",
 "cancelOwnValueMouseover":"",
 "debug":false
 }
);

// #2
spjs.casc.init({
 "manualMode":true,
 "dataSource":dataSource,
 "lookupList":"", // not used when dataSource is defined
 "lookupListBaseUrl":"", // not used when dataSource is defined
 "lookupListFields":["Title","Value"],
 "thisListFields":["CustomField3","CustomField4"],
 "dropDownDefaultvalue":"Select...",
 "filter":{"filterField":"Title","filterValue":"YourFilterValue","operator":"eq"},
 "hideEmptyDropdowns":false,
 "autoselectSingleOption":true,
 "clearInvalidSelection":true,
 "addOwnValue":false,
 "addOwnValueMouseover":"",
 "cancelOwnValueMouseover":"",
 "debug":false
 }
);
  • Added a new option for letting the user type in their own value by canceling the dropdown select and show a text input. This option can only be used for single choice cascading dropdowns, and only when setting up a cascading dropdown in the Custom JS (the option is not available when using the “Cascading dropdown” tab in DFFS backend”). This works by removing the dropdown select for the field you select, and for all descendants of this field. This action can be reverted to restore the dropdowns. Look at the snippet below for setup instructions:
spjs.casc.init({
 ...
 ...
 "addOwnValue":true,
 "addOwnValueMouseover":"Add your own value",
 "cancelOwnValueMouseover":"Reset",
 ...
 }
);

March 12, 2017 BETA

DFFS v4.4.3.9 BETA (March 12, 2017)

This is in BETA because of new functionality and that jQuery now loads with “noConflict”.

  • DFFS rules: changed the name from “And these rules or functions = true / false” to “Linked rules and functions”.
  • Added support for letting “Linked rules” trigger the parent function on change. Previously a rule containing “Linked rules” would only validate on load. With this new functionality you can have a rule with a trigger where the main trigger validates to “true” on page load, but with “Linked rules” that validated to “false”. When each of the linked rules are triggered on change later on, this rule and all linked rules will be revalidated – and if all validate to true, the parent rule will be triggered.
    This new functionality must be turned on for each rule by checking “Let linked rules trigger the parent rule on change”.
  • Enforced numbers only in side-by-side index.
  • Allowed a-z A-Z 0-9 and _ in “Tab unique ID”, Heading and HTML section “Unique ID” and “Rule friendly name”. Previously only a-z and 0-9 was allowed.
  • Added jQuery.noConflict() to the DFFS Loader to prevent errors when using other third party code that loads jQuery. This will create a separate name-space jQspjs that is used as alias for jQuery in DFFS and all plugins.
  • Fixed a bug in the handling of the “DFFSID” URL parameter when sending an email form NewForm with a link to the current item. The problem only occurs in SP2013 / 2016, and will fail to load the correct item. When upgrading theses links will work as expected. Please note that the field “_DFFSID” must be indexed if your list may contain more than 5000 items.
  • Fixed an inconsistency where not all calls to a custom function from a rule would pass the rule id as argument.
  • Removed the padding of the selected tab in DFFS both frontend and backend (in the CSS files) to prevnet the tabs from stacking up incorrectly when using zoom in the browser.

SPJS-Autocomplete v1.5.4 BETA (March 12, 2017)

This is in BETA because jQuery now loads with “noConflict”.

    • Added support for “optionDetailPrefix” that lets you use a prefix in the dropdown for each of the fields in the “optionDetailFields” array.
 "optionDetailPrefix":["Status: "]
    • Added new option “searchFields” that lets you specify which fields you will search in when typing in the searchbox. It’s still the “showField” that will be show in the input when you have selected an item.
 "searchFields":["Title","Status","Author"]
  • Fixed a few small issues with the blur event on an autocomplete where you could enter an invalid value if you pasted an invalid option and tabbed out of the field within 250ms.

vLookup v.2.2.90 BETA (March 12, 2017)

This is in BETA because jQuery now loads with “noConflict”.

  • Translation / replace in documents wasn’t working when using folders.

SPJS-lookup v1.1.8 BETA (March 12, 2017)

This is in BETA because jQuery now loads with “noConflict”.

  • Added MUI support on labels in the configuration options “dropDownDefaultvalue”, “linkText” and “saveNewItemText”.
  • Added new options “orderBy” that lets you sort the options by another field than the “optTextFieldInternalName”.
  • Documented the “optValFieldInternalName” option.
  • Documented the “parseFunction” option.

SPJS-Utility.js v1.300 BETA (March 12, 2017)

This is in BETA because jQuery now loads with “noConflict”.

  • Changed the getFieldValue function to work on attachments. The returned value will be an anchor tab with the name and link to the attachment file.

You find the files in this BETA here.

Please don’t uses this in a production release until it is out of BETA, and any feedback you can give on the new functionality related to linked rules are appreciated.

February 25, 2017

DFFS v4.4.2.9 (February 25, 2017)

  • The dateformat in setFieldValue when using “timestamp” now supports d and M for single digit day and month.
  • Trimmed the string added in the “Run these functions / trigger these rules” sections to avoid errors when leaving a whitespace behind the function name.
  • Disabled the functionality that made the rows switch place to show the active tab in the lower row when using the “Split tabs in multiple rows” in the Misc tab.
  • Fixed an issue with setting a people picker as readonly and it sometimes didn’t update the value in the readonly presentation.
  • Fixed an issue where the styles in the form was not applied on the printout in IE.
  • Fixed an issu with cloning a form that has the “formConfig=XYZ” in the “pageId”. This will now be included in the cloned config.
  • Added option to redirect from NewForm to DispForm.
  • Created new pages with documentation for the DFFS plugins SPJS-Cascading dropdowns and SPJS-Autocomplete.

SPJS-utility.js v1.279 (February 25, 2017)

  • Added support for getting and setting “TaskOutcome” in a workflow task column.
  • Addes support for using d and M for single digit day and month in the format when calling the function spjs.utility.dateObjToFormattedString
  • Fixed an issue when trying to run the getMaxID function on the “userInfo” list. This would return a number in the millions range due to some system accounts being created with a really high ID.
  • Added support for setting the “All day event” and “Recurring” as readonly.

SPJS AC v1.5.1 (February 25, 2017)

  • Fixed an issue where editing a value in the autocomplete and immediately tabbing out of the field made it fail to validate the input.
  • Changed the status images and the coloring of the input when inputting invalid values.
  • Added some more checks to ensure you have used the correct field as “placeholder” for the Autocomplete. You will get a notification if you use “multiselect” and doesn’t have a multiling plain text field as “placeholder”.
  • Fixed an issue where a lookup column that was used in the “setFields” configuration was not cleared when clering the value in the autocomplete. If this is done in EditForm and the lookup column is a required field set in the list settings, the topmost item will be selected as no “(None)” option is available. Please note that this change is done in spjs-utility.js so you must update this to the latest version.
  • Fixed some weaknesses in the reValidateOnLoad functionality.
  • A few “internal” changes to ensure more stable performance when changing the selection in the autocomplete.

SPJS Cascading dropdowns v3.7.0 (February 25, 2017)

  • Added support for using an initial filter to narrow down the dataset to items matching the filter.

vLookup v2.2.84 (February 25, 2017)

  • Fixed an issue with using {var:somVariable} in the “replace” functionality in the “Special configuration” for a field in vLookup backend.

spjs-Lookup v1.1.6 (February 25, 2017)

  • Fixed an error occurring when NOT using the option “clearInvalidSelections”.

February 15, 2017

DFFS 4.4.2.8 (February 15, 2017)

  • Added support for “All day event” and “Recurring” as triggers in DFFS rule. Also added support for setting these fields as readonly.
  • Added a check to ensure you don’t save duplicates in case the same field was selected multiple times in for example “Hidden fields” or “Required fields” in a rule.
  • Fixed a bug where the attachment field was removed from a tab in case you deleted the last attachment.
  • Added support for using redirect in a modal dialog to redirect from NewForm to EditForm, or to save an EditForm and reload the same item (in Misc tab). You can also use this code to add a custom redirect after you save a NewForm or EditForm:
    spjs.dffs.redirect("https://you_tenant_url.sharepoint.com/your_target_page?some_url_key=some_value",false);

    The second parameter is true for open in dialog, and false for open in the same page. Please note that opening a redirect page in a dialog is ONLY allowed if the form you are redirecting from is in a dialog.

  • Fixed an error in a built in object “spjs.dffs.data.tabConfigObj” where only the tab id was used an not the “friendly name”. This object is for internal use, or if you feel creative and want to build advanced functionality in the Custom JS.
  • Added a new operator “does not contain”. Please consider this as BETA until I have gotten a bit more feedback on the functionality.

Installer_CEWP_code.html v1.0.1.1 (February 15, 2017)

  • Added link to go directly to the DFFS Backend from the installer page.

SPJS-utility.js v1.275 (February 15, 2017)

  • Added support for setting and getting the “All day event” and “Recurring” checkbox values.
  • Fixed an isseue with getFieldValue on a people picker in SharePoint 2010. This one made the validation of a required people picker field fail even if it was properly filled in.

vLookup v2.2.82 (February 15, 2017)

  • Added support for using MUI on “thousandsSeparator” and “decimalSeparator” in “Number format” under “Special configuration”.
  • Fixed an error in a function used to get the “maxID” in the child list when vLookup was used on the root of a site collection and the “baseUrl” was “/”. This would sometines make a folder render as empty even if it has documents in it.
  • Added a few new options in the “Special configuration” – see help icon for details.

SPJS-Lookup v1.1.5 (February 15, 2017)

  • Added a new options “clearInvalidSelections” to control how selection that has been removed from the source list after it has been first used in a list item, and then the list item is edited. Add this option to the function call. I’ll update the documentation for this solution in the near future. Previously the functionality was like SharePoint’s own lookup colund and the value was cleared. If you set “clearInvalidSelections” to false, your value will be preserved when if you edit the list item, but it will NOT be selectable in items that hasn’t already used this option.
  • Moved the debug output (when using “debug=true”) down to the field itself and added the argument object to the debug output.

SPJS-Casc.js v3.6.9 (February 15, 2017)

  • Added support for using a multichoice lookup column in any place in the “line” of fields and not only as the last one. Please note that you will get duplicate values in the fields if you have duplicates in the datasource in multiple field when using multichoice lookup fields.

February 01, 2017

DFFS v4.4.2.7 (February 01, 2017)

  • Updated the ACE code editor to v1.2.6
  • Added built in function to redirect from NewForm to EditForm, or to save changes in EditForm, and keep editing the same item. This works in SharePoint 2010 and 2013 / Office 365 when the form is NOT opened in a modal dialog. See Misc tab in DFFS backend.
  • Fixed an issue with the function that verifies an email address when using REST to set emails. This function would not recognize the user login name if this was used instead of an email address.
  • Fixed an issue where a rule that cleared a people picker and at the same time set the field as readonly kept showing the old value even if the field was cleared.
  • Fixed an issue with detecting folders in a custom list.
  • Fixed an issue with “beforeproperties” on people picker fields on SharePoint 2013 on premises when loading a list item in DispForm. An error in the script caused the ID to be returned with a trailing semicolon, and caused DFFS rules like “Compare logged in user with people picker field” to fail.
  • Added better error handling to the function “strToDateObj” so it will not throw an error if your pass an invalid FieldInternalName.
  • Changed to a lighter shade of gray for the “checkbox” representing a readonly Yes/No column in NewForm or EditForm, or in DispForm.
  • Fixed the scroll in each tab in DFFS backend to these now are individual and scrolling one will not offset the scroll in another.
  • Added information about fields being required in the list settings in the “List fields” tab.
  • Moved the “Add new field” and “Go to list settings” from the “Misc” tab to the “List fields” tab.

SPJS-Utility.js v.1.272 (February 01, 2017)

  • Fixed an issue where a rule that cleared a people picker and at the same time set the field as readonly kept showing the old value even if the field was cleared.

SPJS-AutoComplete v1.4.14 (February 01, 2017)

  • Fixed a bug occurring when using “optionDetailFields” to specify additional fields to show in the options, and you use arrow keys and enter to select an item. In this case, all text values in the current option (including the details) would be appended to the field.
  • Added “delete” as alias for the “destroy” function.
  • Fixed a bug where clearing an autocomplete instance failed to clear the “setFields”.

vLookup frontend v2.2.80 (February 01, 2017)

  • Fixed an bug where expanding a folder would not execute any custom render function set up in the “Special configuration” for the field.
  • Fixed an issue where the groups wouldn’t order descending if the column you grouped on contained only numeric values.
  • Fixed an potential error with leaving an empty “viewFields” row in the config. This would be saved with the config and would cause an error on load.

SPJS-Casc.js v3.6.8 (February 01, 2017)

  • Added support for using a pipe character to delimit multiple options in all “levels”. Plase note that this may need more testing so please post in the forum if you find a bug.
  • Tried to fix an issue occurring when a multichoice field only contains one option when loading it in EditForm. The field will be marked with a red dotted line, and the field fails to save the selected value.

January 17, 2017

SPJS-Casc.js v3.6.6 (January 17, 2017)

  • Fixed an issue that prevented the use of lookup columns in more than one of the fields in the source list on SharePoint 2013/2016.
  • Added support for using a multilookup column as the source field for the last field in a cascading dropdown configuration. Each of the options will be shown as one option in the dropdown.
  • Added support for using a multiline plain text field with pipe delimited values (Option 1|Option 2|Option 3) as the source field for the last field in a cascading dropdown configuration. Each of the options will be shown as one option in the dropdown.

You find the file here. Unzip and replace the file in “/SPJS/DFFS/plugins”.

January 12, 2017

DFFS v4.4.2.5 (January 12, 2017)

  • The “local” DFFS installer (not yet the APP) has a new button that does a total cleanup of old CEWPs in the form. This can be used to uninstall an older CEWP installation of DFFS.
  • Fixed an issue where you loaded an older version of the cascading dropdowns plugin, and the DFFS backend did not render correctly (missing content in tabs).
  • Changed location of the links to the list settings for adding or modifying fields from the Misc tab to the “List fields” tab (renamed). I have also added a button that opens the list settings in a new tab.
  • Fixed an issue with sending the tab contents from DispForm where the email always would be sent with REST even if you had checked “Use custom list with workflow to send E-Mails” in the “E-Mail and Print” tab.
  • Fixed an issue with crating the DFFS_Email list the first time you checked the “Use custom list with workflow to send E-Mails” in the “E-Mail and Print” tab where some fields would not be added until you unchecked and rechecked the “Use custom list with workflow to send E-Mails” checkbox.
  • Added support in the latest version for a previously undocumented feature where you can have multiple configurations for a form by using this URL key setup:
    https://contoso.com/Lists/Tasks/NewForm.aspx?FormConfig=VariantA

    this config will load a totally different config than this address:

    https://contoso.com/Lists/Tasks/NewForm.aspx?FormConfig=VariantB

    Using this method you can crate different forms that you can link to, and have different DFFS config so your rules in a complex form can be handled separately for each form config”.

SPJS-Casc v3.6.5 (January 12, 2017)

  • Removed an alert when trying to load the config in a content type that doesn’t have the fields used in the cascading dropdown configuration – for example in a folder in a document library.
  • Fixed an error where the “fields” object was not correctly populated, causing a malfunction of the cascading dropdowns.
  • Added support for using a lookup column as a source field for the cascading dropdown in SP 2013 (was lost in v3.6.x after changing the query to use REST). Please see the help icon in the cascading dropdonw configuration screen in DFFS backend (requires DFFS backend v4.4.2.5) for details.
  • Added “Note to self” in the cascading dropdown config screen in DFFS backend.
  • Fixed an issue with using the setting “Hide the dropdowns when they have no available options” with DFFS tabs.
  • Fixed a bug where you would get an error like “the object doesn’t support the property or method match”.

You find the change log for older versions here.