Page 1 of 1

Create New item in another library

Posted: 30 Nov 2017
by Roo
I want to be able to create a new list item in another (sub) library from within the "master" library. Something like a button. Is this best done in SPD or from within form designer?

Re: Create New item in another library

Posted: 30 Nov 2017
by Nikita Kurguzov
Hello, Roo!
There are many ways to do it, including Workflows, MS Flows, JavaScript requests, etc. As for Forms Designer, easiest way to do it would be to use Related Items control which allows you to view another list or library from within the form.

You can create Items just like you would if you had the list opened, so it's not exactly the button, but it doesn't require much configuration at all. If you need to tie items to the current item, you can do that, but you can also skip this step if if this is not necessary. And if you are uploading documents to document library, it allows you to directly drag and drop them inside the control.

Re: Create New item in another library

Posted: 30 Nov 2017
by Roo
Thanks for the link - Sorry I didn't know the terminology, so couldn't find it.

When creating an item can I pass the value of the parent field into the child list

ie: Parent list field name : "Supplier_x0020_Name"
Child list: "Contractor"

I was looking here, but it wasn't quite right: https://spform.com/related-items/inline ... point-form

Thanks

Re: Create New item in another library

Posted: 01 Dec 2017
by Roo
Having looked at some of the earlier Post I found this:

window.top.fd.field('Supplier_x0020_Name').value()

If this is the correct procedute
where and how do I update the child list value to this? I've already created the "Child form" I just need it to open with the value already entered.

Re: Create New item in another library

Posted: 01 Dec 2017
by Nikita Kurguzov
Hello, Roo!
Yes, I was about to write to you, this should work as long as parent form is opened in full-screen, not in dialog mode.
This script is placed on child form and when it opens, it opens in dialog mode, it goes to the window.top and accesses the parent form to retrieve values from there. You can then use this value to populate the child form where "Contractor" field can either be hidden or shown to the user, depending on your requirements.

Re: Create New item in another library

Posted: 01 Dec 2017
by Roo
Thank Nikita - I'm slowly getting there so forgive me :)

When you say populate the contractor field - how do I go about this exacly? I've been trying a number of things, but I can't seem to get it right.

Re: Create New item in another library

Posted: 01 Dec 2017
by Roo
Ignore that dude - It did work - I put in the edit form not the new. Its been a long week!

Thank again - GREAT PRODUCT

Re: Create New item in another library

Posted: 01 Dec 2017
by Nikita Kurguzov
Excellent! If you'll need any other help with Forms Designer, let me know!