Forum Replies Created
-
AuthorPosts
-
I’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
Hi,
I added this new functionality in the new version – can you test it and let me know how it works?Alexander
This should be fixed in the new version – can you test it and let me know how it works?
Alexander
I 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 #37451Yes
February 1, 2024 at 16:31 in reply to: Can I have an example of calling a jscript function from a rule #37449Did 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
Hi,
I’ll have to test this and see if I can replicate it. Can you email me screenshots of the setup and the error so I can set up a similar test?Alexander
I’m planning a new version hopefully over the weekend, but I’m not sure if I’ll be ale to get this one in that release – I’ll see what I can manage. If not, it should be fixed in a week or two.
Lists already work as the form is the primary input so you fill in the form and save.
Alexander
This is not an option in the current version, but I’ll look at adding that functionality in a future version.
Alexander
I’m planning to release a new version during or over the upcoming weekend.
Alexander
Thanks, I think this helped. I’ll include a fix in the next release.
Best regards,
AlexanderGood idea, I’ll look into it for the next version.
Alexander
It must be a permissions problem. I’m actually not 100% sure, but you might have to be a site collection admin to be able to list all subsites.
What you can do if this is a problem is to install the Charts solution in the subsite your coworker is trying to access.
Alexander
There is unfortunately no function to block the selection of the dates, but you can run a validation after the user has picked the date by adding some custom js and a rule.
Add this to your custom js:
function validateDateField() { var dateFieldInternalName = "DateColumn1"; jQuery(".customDateValidation").remove(); var today = new Date(); var date = spjs.utility.getDateFieldAsDateObject(dateFieldInternalName); var requiredDateOffset = 6; var diffDays = (date - today) / (24*60*60*1000); if (diffDays < requiredDateOffset) { jQuery("#dffs_"+dateFieldInternalName+" td.ms-formbody").append("<div class='customDateValidation' style='color:red;'>The date must be atleast <strong>"+requiredDateOffset+"</strong> in the future.</div>"); jQuery("#dffs_"+dateFieldInternalName+" input").val(""); } }
Change “DateColumn1” to match your date field internal name.
Now add a rule that triggers on “is changed” on your date field and add the name of the function to the “Run these functions / evaluate these rules” field like this:
validateDateField
When a selection is made in the field, this code checks if the value selected is 6 days in the future and shows a message and clears the value if it is not at least 6 days ahead.
Alexander
-
This reply was modified 1 year, 1 month ago by
Alexander Bautz. Reason: Fixed code snippet format
I’ll fix this in the next version.
Alexander
-
This reply was modified 1 year, 1 month ago by
-
AuthorPosts