Forum Replies Created
-
AuthorPosts
-
Alexander BautzKeymaster
Hi,
You must pass an unique value from the “parent” to the “child” when creating the new item, and then use this value to filter the records to only show the items created from this “parent”.See this setup example: https://spjsblog.com/vlookup-for-sharepoint/vlookup-setup-example-for-sp-2010-and-2013/
Alexander
Alexander BautzKeymasterHi,
v4.4.1 is from 2016 so you won’t have the latest version features.You might be able to upgrade to the lates version, but I cannot guarantee that this will work when you upgrade from a 8 year old version.
To do a proper upgrade, you must delete the DFFS folder in your SPJS document library and upload the new version of DFFS.
This will not affect your configurations as these are stored in a separate list.
When you have uploaded the new DFFS version and configured the DFFS installer you must uninstall and reinstall DFFS in the forms for your list.
If this works you are good to go, if not you must downgrade the DFFS version and try to do a step by step upgrade a few versions at the time (you must open the config and save it in each version to ensure you apply the features from this version) – not sure how this will work out as you have such an old version…
Let me know if you have any questions.
Best regards,
AlexanderAlexander BautzKeymasterThe only way to do this if you don’t want to use the built in method is to have a query that runs pre-save to check for duplicate values. This is pretty straight forward if the list does have to many items. If you exceed a few thousands items, the query would slow down the save process because it has to wait for the query to return.
Basically you can use something like this in your custom js:
function dffs_PreSaveAction(){ var res = spjs.utility.queryItems({ "listName": _spPageContextInfo.pageListId, "query": "
" }); if(res.count > 0){ spjs.dffs.alert({ "title": "Duplicate value", "msg": "An item with this title already exist, please change the value and try again.", "ok": function(){ // Close dialog } }); return false; } return true; }"+getFieldValue("Title")+" Alexander
Alexander BautzKeymasterI’m glad you figured it out.
Alexander
Alexander BautzKeymasterSorry, but I don’t have any method of overriding this message as it is a built in message in the out-of-the-box sharepoint.
Alexander
Alexander BautzKeymasterHi,
Can you show me the rest of the configuration under the “Render field as autocomplete search box” – are you sure you have the same setup in NewForm as you have in EditForm?Alexander
Alexander BautzKeymasterIt might be a similar issue related to using an underscore – try changing the name of the _vLookupParentID field to not start with an underscore (you must delete it and recreate it without the underscore) and see if that helps.
Alexander
Alexander BautzKeymasterNo problem – I forgot a little quirk when using a field that starts with an underscore in a rest filter – you must prefix the field name with OData_ like this:
OData__vLookupParentID eq '[[fieldValue:_vLookupID]]'
Alexander
Alexander BautzKeymasterThe filter value must be in single quotes like this:
_vLookupParentID eq '[[fieldValue:_vLookupID]]'
Alexander
Alexander BautzKeymasterI’m glad it worked – I just tested and could not reproduce it…
Regarding the ID, you can still use _vLookupID and _vLookupParentID if you like – if you add the _vLookupID column to your list, it will auto-populate like it did before.
You can also use a column named “_DFFSID” – add it to your list and use the automatically generated ID to transfer to a field you can call _DFFS_ParentID (or whatever you like) and use the same logic as for _vLookupID and _vLookupParentID.
I just realized that I had not documented this in the user manual – I’ll add it.
Alexander
Alexander BautzKeymasterHi,
I added this new functionality in the new version – can you test it and let me know how it works?Alexander
Alexander BautzKeymasterThis should be fixed in the new version – can you test it and let me know how it works?
Alexander
Alexander BautzKeymasterI have released the new version – check it out and let me know if you still have problems.
Alexander
February 1, 2024 at 22:37 in reply to: Can I have an example of calling a jscript function from a rule #37451Alexander BautzKeymasterYes
February 1, 2024 at 16:31 in reply to: Can I have an example of calling a jscript function from a rule #37449Alexander BautzKeymasterDid you use the dffs_fieldChanged function from the Custom JS example thread?
You should be able to do it something like this:
function dffs_fieldChanged(fin, new_value, previous_value) { switch (fin) { case "fieldA": setFieldValue("fieldB", new_value.substring(0, 10)); // 10 first characters of fieldA is written to fieldB break; case "fieldC": setFieldValue("fieldD", new_value.substring(0, 10)); // 10 first characters of fieldA is written to fieldB break; } }
Alexander
-
AuthorPosts