Forum Replies Created
-
AuthorPosts
-
This is great! How about just having a text field in the pop-up that I can then use as a variable to do other stuff with once they click ok?
AWESOME! THANK YOU, Alexander!
Hi, thank you for that data. This works great for a user that has access to the site, but what about inserting people names that are not currently users of the site?
Use case: creating a list item to assign to Joe Smith. Joe Smith will receive an email from the site, but Joe Smith does not actually use the site as all he needs from it is the email. We have many examples of sites that users do not access them, yet we send communications to them via the sites to call for action on various business processes and tasks.
Perfect, thank you.
Thank you, Alexander.
I’m using jQuery UI with DFFS. Any way to detect an on change event for a date field? My code will run when I type a date, but not when I use the jqueryUI date selector widget.
jQuery(“#dffs_Date1”).find(“input”).datepicker();
Thank you very much, Alexander! This worked for text field, but not the “select” drop down options for other fields.
Would you happen to know how I can trigger a change event for sharepoint dropdown columns? I tried the below, but it does not work.
jQuery(“dffs_FIELDNAMEHERE”).find(‘input”select’).on(“change”, function(){
//my code
});January 17, 2020 at 07:40 in reply to: Count files in child folder when using the vLookup Add new Folder / doc library #28288Here is what I have come up with – working beautifully.
function checkForAttachments() { //check for a folder first var vLookupID = getFieldValue("_vLookupID","disp"); //vLookup ID from THIS item var res = spjs.utility.queryItems({ "listName": "{LIST_GUID}", "query": "<Where><Eq><FieldRef Name='VLOOKUP_INTERNAL_FIELD_NAME_FROM_CHILD_LIST' /><Value Type='Text'>"+vLookupID +"</Value></Eq></Where>", "viewFields": ["ID"] }); if(res.count > 0){ var folderID = res.items[0].ID; window.console && console.log("folderID = " + folderID); //query for child items in the folder var res = spjs.utility.queryItems({ "listName": "{LIST_GUID}", "query": "<Where><Eq><FieldRef Name='VLOOKUP_INTERNAL_FIELD_NAME_FROM_CHILD_LIST'/><Value Type='Text'>"+vLookupID+"</Value></Eq></Where>", "viewFields": ["ItemChildCount"] }); //window.console && console.log(res); var IDAttachmentCount = res.items[0].ItemChildCount; window.console && console.log("IDAttachmentCount = " + IDAttachmentCount); //split IDAttachmentCount by the # delimiter var attachmentCount = IDAttachmentCount.split('#'); var attachmentCount = attachmentCount[1]; window.console && console.log("attachmentCount = " + attachmentCount); //check count and update Attachments? column if(attachmentCount > 0){ window.console && console.log("Attachments found: updating attachments column to Yes"); setFieldValue("attachmentsYN", "Yes"); setFieldValue("attachmentCount", attachmentCount); } if(attachmentCount <= 0){ window.console && console.log("No Attachments: updating attachments column to No"); setFieldValue("attachmentsYN", "No"); setFieldValue("attachmentCount", attachmentCount); } } else { window.console && console.log("no folder yet"); } }
January 16, 2020 at 21:14 in reply to: Count files in child folder when using the vLookup Add new Folder / doc library #28284The vLookup query is below. I set the current item vLookupID to a field “actionPlanID” in the child list, which is the document library.
<Where><Or><Eq><FieldRef Name='actionPlanDocID'/><Value Type='Text'>[currentItem:_vLookupID]</Value></Eq><Eq><FieldRef Name='actionPlanID'/><Value Type='Text'>[currentItem:ID]</Value></Eq></Or></Where>
January 16, 2020 at 01:52 in reply to: Count files in child folder when using the vLookup Add new Folder / doc library #28265Thanks – I’ve gotten the below, and in the attached file you’ll see the results of the console output. I am trying to get the ‘count’ into a variable so that I can it for other logic. What syntax do I use in the vLookup dataObj or the spjs.dffs.data to get the count from the result in the attached image?
The function I have so far:
function testDataLog(){ window.console && console.log(spjs.vLookup.dataObj['vLookupAttachments'][spjs.dffs.data.thisItemID]); }
Attachments:
The above is working great for the initial solution, but I have a new need:
Update the folder name name in a document library base don the vLookup item in the current item to the _vLookupParentID in the child item.
I’m having difficulty re-naming the folder name (INT = FileLeafRef), but also understanding how to specify a different id in the child list to target.
I want to target the vlookup column in the child list, matching to the vlookup column in the parent list. How to write this in the spjs.utility.updateItem?
var res = spjs.utility.updateItem({ "listName": "my_document_library_child_list", "id": getFieldValue("_vLookupID"), //vLookup ID in parent list "data": { "FileLeafRef": "NEW_FOLDER_NAME_TEST", // The Folder Name in the child library } }); if (res.success) { // Updated successfully } else { alert(res.errorText); return false; // stops the save process } }
- This reply was modified 4 years, 11 months ago by Jon Whisman.
Sorry for my late reply.
The cascading dropdown actually does pull back an ID (‘mentorID’) from the lookup list. I place this into a ‘mentorID’ field within the current item at the end of the cascade in the form. The ‘mentorID’ in the lookup list is set upon item creation via workflow from the lookup list ID field.
With that, all I’m after is creating a new function I can do via dffs_PreSaveAction in the current item that will update certain fields in list B, doing a match against the ‘mentorID’ in the current item to the ‘mentorID’ in the lookup list.
Hi Alexander,
To answer your question, what I’m after is the below.
The person filling in list A uses the a cascading dropdown and selects a Mentor from list B. On Save (I’ll use the preSave function), the data in list B should be modified to update fields in list B as below:
paired = yes
set protegeID (ID from list A) into protegeID into list B.This way, I can use vLookup in a list view of list A to pull back data from list B of who list A people have been paired with from list B based on ID.
Hope this makes sense. The workflow does the above at the moment, but randomly fails.
March 11, 2019 at 21:22 in reply to: Creating headers WITHIN Side by side columns in the form #24255Marvelous! Works without issues.
March 11, 2019 at 16:32 in reply to: Creating headers WITHIN Side by side columns in the form #24243Need some additional help if you can. Each time the tab is clicked, a new header is generated.
Example: click into another tab, then back into the tab with the code above = a new header.
Repeat this multiple times and I have multiple headers stacked on top of each other.
I tried to clear the div content before the div is written so that any previous div’s would be deleted, but that did not work.
Any suggestions or code to do a clear of any previously rendered headers before the new header is rendered?
March 11, 2019 at 16:09 in reply to: Creating headers WITHIN Side by side columns in the form #24239Worked beautifully, thank you!!!
-
AuthorPosts