additional property on dropped documants
Hello,
I have a small question about the related items, dropped documents function. we have a form with dropped documents inside. So we fill a relationship with the fd.updateDroppedDocuments function.
Can I add an additional property from the parent form to the dropped document? We use this code:
fd.updateDroppedDocuments('.transferdocs', {
Teilnehmernr: GetUrlKeyValue('ID')
});
Thanks a lot.
RAB
I have a small question about the related items, dropped documents function. we have a form with dropped documents inside. So we fill a relationship with the fd.updateDroppedDocuments function.
Can I add an additional property from the parent form to the dropped document? We use this code:
fd.updateDroppedDocuments('.transferdocs', {
Teilnehmernr: GetUrlKeyValue('ID')
});
Thanks a lot.
RAB
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi RAB,
Sure, here is a sample:
Get more info:
http://spform.com/forms-designer- ... ick-upload
http://spform.com/documentation/js/manager
Sure, here is a sample:
Code: Select all
var replacements = {
Teilnehmernr: GetUrlKeyValue('ID'),
Field1: fd.field('Field1').value()
}
fd.updateDroppedDocuments('.transferdocs', replacements);
// If the Field1 has changed
fd.field('Field1').change(function () {
replacements.Field1 = fd.field('Field1').value();
});
Get more info:
http://spform.com/forms-designer- ... ick-upload
http://spform.com/documentation/js/manager
Hello Dimitry,
thank you for your answer. It works perfekt, if I switch to the edit mode. So I have try to modify your code like this:
var replacements = {
Teilnehmernr: GetUrlKeyValue('ID'),
Field1: fd.field('Field1').control()._el().text() // also .value()
}
fd.updateDroppedDocuments('.transferdocs', replacements);
But it didn't work. My Field1 is a cross-site lookup column.
Thank you for your help.
rab
thank you for your answer. It works perfekt, if I switch to the edit mode. So I have try to modify your code like this:
var replacements = {
Teilnehmernr: GetUrlKeyValue('ID'),
Field1: fd.field('Field1').control()._el().text() // also .value()
}
fd.updateDroppedDocuments('.transferdocs', replacements);
But it didn't work. My Field1 is a cross-site lookup column.
Thank you for your help.
rab
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Please, try this:
Code: Select all
var href = fd.field('Field1').control()._el().find('a').attr('href');
var replacements = {
Teilnehmernr: GetUrlKeyValue('ID'),
Field1: fd.getUrlParam(href, 'ID')
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests