Related item: prepopulate second field, not ID
Dmitry, how did this got resolved? I'm working on the same thing (and send you an email).
I actually get the value i'm looking for from the Parent in that Alert screen, but it does not populate on my child form still when I take out the Alert.
var parentID2 = fd.getSourceID();
if (parentID2) {
fd.field('RelatedCentralTask').control().value(parentID2);
alert(window.top.fd.field('REOmatchID').value());
$('.RelatedCentralTask').hide();
}
I actually get the value i'm looking for from the Parent in that Alert screen, but it does not populate on my child form still when I take out the Alert.
var parentID2 = fd.getSourceID();
if (parentID2) {
fd.field('RelatedCentralTask').control().value(parentID2);
alert(window.top.fd.field('REOmatchID').value());
$('.RelatedCentralTask').hide();
}
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Hello, Wouter!
I've already answered you in email, but just in case - this code should get the value from the Parent Item, just tested it myself:
Make sure to add this code to the Child form, not the parent form.
I've already answered you in email, but just in case - this code should get the value from the Parent Item, just tested it myself:
Code: Select all
fd.field('Title').value(window.top.fd.field('Title').value());
Cheers
Hello,
I have a similar problem - I've also done a related item but on New form and with these instructions:
https://spform.com/documentation/relate ... gular-mode
Populating one child field from parent works fine, however I also need a second one to be populated automatically from the parent and furthermore, I need both these lookup fields to be populated in other related items in different tabs too.
Can this even be done in FormsDesigner?
Thanks,
Tanja
I have a similar problem - I've also done a related item but on New form and with these instructions:
https://spform.com/documentation/relate ... gular-mode
Populating one child field from parent works fine, however I also need a second one to be populated automatically from the parent and furthermore, I need both these lookup fields to be populated in other related items in different tabs too.
Can this even be done in FormsDesigner?
Thanks,
Tanja
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Tanja,
Populating two fields in Child should be easy, but is it really necessary here? I assume that you have two Lookups to Parent, but one of them looks up Parent ID/Title and another one is a lookup to Date, correct?
You can just use one field instead and select Date as an additional field in Child List -> List Settings -> Lookup Column: This way you only need to populate one field. If you really need to populate both, that's also easy, just let me know and I'll help you do just that.
If there are other Related Items on Parent form, please, follow instructions for the other ones as well, simply give them a different class name and add all the necessary code.
Populating two fields in Child should be easy, but is it really necessary here? I assume that you have two Lookups to Parent, but one of them looks up Parent ID/Title and another one is a lookup to Date, correct?
You can just use one field instead and select Date as an additional field in Child List -> List Settings -> Lookup Column: This way you only need to populate one field. If you really need to populate both, that's also easy, just let me know and I'll help you do just that.
I am not sure what I completely get this, can you please provide me with a screenshot or a video with explaination of what you need? Otherwise, it's a bit confusing.I need both these lookup fields to be populated in other related items in different tabs too
If there are other Related Items on Parent form, please, follow instructions for the other ones as well, simply give them a different class name and add all the necessary code.
Cheers
-
- Information
-
Who is online
Users browsing this forum: No registered users and 11 guests