Forum Replies Created
-
AuthorPosts
-
I think I got it. I created a button that initiates the attachment setup, creating the folders and sub folders. The only thing left is preventing the vLookup from initiating until after the attachment setup click, or would it be better to have the vLookup wrapper hidden instead and then just JQuery to show and refresh?
Ah ok, I thought I had seen an old post mentioning it didn’t have a rename capability. Thanks for that info.
For the folder creation, that may be a better idea. Have a button that “initiates” the table so it can create the folder or check if the folder is there and create if not? Trying think of how to best code that up.
That is perfect and it works! I was about to have to recreate my own upload page which I didn’t want to do so many many thanks!
2 more questions:
- Does spjs.dffs.updateListItem have a renaming conventions for folders?
- I realized that creating a folder on new item will also continue creating folders when pressing refresh or F5 on the new item form. Aside from creating an event listener on the F5 keyboard press, is there one that exists for pressing the refresh button on a browser?
Again thank you so much for all the help!!
- This reply was modified 3 years, 4 months ago by Jonathan Stamper.
I’m really close and decided to change the logic to only occur when a new item is initiated (dffs_ready).
- I have it creating a folder in the child document list using the vLookupID with the “:” replaced with “_”on New Item only
- I also did more research in the vLookup settings and am able to point the table settings to look at the folder destination using a global variable – {var:parentFolderName} and set that as the default.
- If the user cancels the request it deletes the folder.
Where I’m stuck is hiding the destination folder field and choose field button that show up when adding an attachment. I was hoping a simple css removal in my custom css would do it but it’s not setting the display to none.
Would you have any ideas or any feedback on above or a better option?
Thank you and great point and tip. I managed to get the logic working for loading to the custom people picker on the alert.
Now I just need to work out the configurations on sending the auto emails. First time using it in DFFS and look forward to checking it out.
Ah, I just figured it out with where to execute the function. It’s just right below the custom alert like this:
function doEmailSend(id){ var htmlDiv=“<div style=‘Width:550px;’> + “<label>Select users to email</label>” + “<div id=\”userEmails\”></div></div>”; spjs.dffs.alert({ “Title”:”Email Observation”, “msg”:htmlDiv … }); $(#userEmails”).spPeoplePicker(); }
Then the people picker is set up using logic courtesy of https://www.enjoySharePoint.com/client-side-people-picker-in-sharepoint-online-using-javascript/
I’d still like to check to make sure that’s the best practice and if usable for collecting the email addresses and sending the emails.
Yes!!! Debugging made me realize how that function works so I’m using “parentListGuid” for the New Form check and vLookup. I just need to rework my conditionals to fix it.
Thank you for all the help! I really appreciate it.
- This reply was modified 3 years, 4 months ago by Jonathan Stamper.
Ah wait, the GetUrlKeyValue(“vLookupEdit”); returns “” on new form. Is there a different key value for new form?
Yep! That was it. It needed to load first to catch the prefill then it went through the autocomplete successfully.
Awesome! Thank you so much!
Ok, so I’m doing that but for some reason when it hits the autocomplete logic on the child form it doesn’t recognize the getFieldValue(“Field I’m Passing from Parent”); within the rest filter. I did a console.log and it shows “”, but after load it appears to show.
Maybe I need to wait for the form to load before passing?
Yeah I figured it was probably not worth the effort. Thanks for the input and info.
Apologies, I’m hoping this is my last question, and I may be overlooking/overthinking it but is there a way to pass field values on the parent form (edit form) to a new/edit child form? Reason being that I have a child list containing an autocomplete that needs to filter from the autogenerated ID of the parent.
One more question, if the main request form is in dialog, is there a way to redirect back to the main request view page, open the form in dialog and then incorporate some sort of alert to prevent the user from clicking cancel?
That may be too far fetched but the goal is to try and maintain as much of the workflow emailing within the main request form.
Ah that’s right! That works. Much appreciated.
June 17, 2021 at 19:43 in reply to: dffs vlookup,Precancel events,control of cancel list item #33797I think I figured it out but made it more complicated than it needed to be so I revert it to the remove child items on cancel for NewForm only.
I just need to wrap my head around the syntax for the document delete of the other vLookup.
June 17, 2021 at 15:20 in reply to: dffs vlookup,Precancel events,control of cancel list item #33795I love this and this is exactly what I’m looking for. 2 questions:
If I’m keeping my edit/display form and new form JS logic together how can I create a global variable that let’s me know which form the current user opened (dialog or not)? That way I could set another variable to equal getFieldValue(“_vlookupID”) for New and spjs.dffs.data.thisItemID for Edit/Display?
If I have 2 vlookups – 1 child is a doc library the other is a list. Is it better to create one function/section to handle both break out into two different loops?
-
AuthorPosts