v1.12 Fixed a bug in the function setFieldvalue. This bug appears when trying to set a single item lookup column using the lookupID, when the lookup target list has more then 20 items (in IE only). --------------------- v1.13 Changed the function "setFieldValue" for date columns. --------------------- v1.14 Changed getFieldValue for DispForm for compatibility with SP 2013. Please note that I have not tested all code in this file with SP 2013. --------------------- v1.15 Fixed getFieldValue for choice columns where "Allow 'Fill-in' choices" is activated. --------------------- v1.16 Changed setFieldValue for SPFieldChoice and SPFieldMultiChoice to fix issues with clearing values. Fixed getFieldValue and setFieldValue for people picker in SP2013. --------------------- v1.17 Fixed compatibility issue in SP2013 with RTE fields and people picker fields. Added support for getting and setting "Managed metadata fields" or "SPFieldTaxonomyFieldType" and "SPFieldTaxonomyFieldTypeMulti". --------------------- v1.171 Changed how getFieldValue handles people pickers in SP2013. When using this code on page load, you must wrap the call like this: ExecuteOrDelayUntilScriptLoaded(function(){ var myPeoplePickerValue = getFieldValue("MyPeoplePickersFieldInternalName","","; ","loginName"); alert(myPeoplePickerValue); },'sp.ribbon.js'); --------------------- v1.172 Tried to fix an error preventing setting a multichoice people picker from the vLookup solution. --------------------- v1.173 Added option to set a single choice Lookup column rendered as a <select> by ID. This affects lookup columns with <20 items in IE, and all lookup columns in other browsers. Changed the method of setting lookup colums to ensure they first try to match by TEXT and them by ID. --------------------- v1.175 Columns containing HTML formatted text will be converted to true HTML when shown in DispForm. When using setFieldValue on a radio choice field, the values are cleared initially. This means you can clear the field by passing an invalid value - like an empty string. --------------------- v1.176 Changed "getUserInfo_v2" to allow for custom user list properties. Retracted --------------------- v1.177 Fixed bug in init_fields_v2() regarding converting HTML formatted text in a calculated column to proper HTML. --------------------- v1.178 Added option to pass scope to the function “spjs_QueryItems”. Use “scope”:”Recursive” to search all items without folders. --------------------- v1.179 Added option to clear a people picker in SP 2013 using setFieldValue - specifying an empty string as new value. --------------------- v1.180 setFieldValue(...) will now update the static value for readonly fields. --------------------- v1.181 Small change to SetFieldValue for people picker in SP2007 and SP2010. --------------------- v1.182 scope added to "spjs_getItemByID". --------------------- v1.183 Updated spjs_updateList to support deleting fields. --------------------- v1.200 http://spjsblog.com/2015/01/19/spjs-utility-js-is-updated-to-v1-200/ --------------------- v1.201 "getUserInfo_v2" or "spjs.utility.userInfo" can now be called with "customProp" as an array. This lets you retrieve multiple custom properties in one query. "setFieldValue" or "spjs.utility.setFieldValue" for a date picker will now pad day and month to two digits. --------------------- v1.203 Fixed a bug regarding "getItemByID" error when called with an invalid ID. Fixed a bug regarding "setFieldValue" for SPFieldDateTime. --------------------- v1.204 Changed how taxonomy fields are returned when using "getFieldValue" - now you get an array of values and not a comma separated string. Added an options to use getFieldValue("ID"); to get the item ID. --------------------- v1.205 Added option to specify a folder in the query when using "spjs_QueryItems". --------------------- v1.206 Fixed a bug in the function "setFieldValue" when setting the value of a read-only column: the value was set in the hidden "original" field, but the read-only value was not updates in the form. Also updated "setFieldValue" for people pickers and inserted a 1 sec delay to ensure the people picker is ready (I do not know about any "callback" I can hook up to). --------------------- v1.208 Fixed missing "click" trigger when setting radio button select (for compatiblity with DFFS rules). --------------------- v1.209 Added support for querying large lists (over 5000 items) using "spjs_QueryItems" or "spjs.utility.queryItems". Please note that these functions are undocumented and mostly used from the different SPJS functions and solutions. Dig into the code to discover how it works, or ask a question in the forum: http://spjsblog.com/forums/forum/spjs-utility/ --------------------- v1.210 init_fields_v2() was changed to fix an issue with how the "FieldDispName" and "FieldType" properties were applied as it in some cases could breake the events on for example a date picker field. --------------------- v1.250 BETA 1 Split up "getFieldValue" and "setFieldValue" in separate functions. You still use them as before, but for advanced users you can now override the function for each individual field type. In this new function layout you can for example override the funciton "getFieldValue_SPFieldText" to change how "getFieldValue" returns the value for a field of type "Single line of text": spjs.utility.getFieldValue_SPFieldText = function(a){ return spjs.$(spjs.utility.data.fields[a.fin]).find('input').val(); } This new layout will also let you add support for new file types in "getFieldValue" and "setFieldValue" by adding a function like this: spjs.utility.getFieldValue_SPField[*****] = function(a){ // change [*****] with the field type of your field, and add your custom getFieldValue logic here. } The same logic applies to the function "setFieldValue". --------------------- v1.250 BETA 2 Various small fixes related to the changes in BETA 1