Cascading LookUp
Posted: 26 Aug 2016
Hello Guys,
I have the following issue
I have a form with a Related Item. In the related Item, I have a cascading lookup column (Artfulbits Component) and I have a Text Filed called Entity. Entity field is automatically filled with the a value that was previously selected from the parent.
Problem is that once the value is assigned to the text field, it look like the onchange event is not executed, and it is needed in order to take the value to be used as the filter for the cascading component.
If I manually add the value to the text field and move to the next, the onchange event is fired and the cascading filter works fine.
Is there a way to force the onchange event when I assign a value to the text field? This is my code:
$(document).ready(function(){
var updateField = function(){
var something = window.top.fd.field('Entity').value(); //This is a lookup colum on the parent
var parentID = fd.getSourceID();
if (parentID) {
fd.field('ParentID').control().value(parentID);
$('.parent-field').hide();
}
fd.field('_x006e_bp4').value(something);
}
setTimeout(updateField,3000);
});
Thanks in advance for any help.
I have the following issue
I have a form with a Related Item. In the related Item, I have a cascading lookup column (Artfulbits Component) and I have a Text Filed called Entity. Entity field is automatically filled with the a value that was previously selected from the parent.
Problem is that once the value is assigned to the text field, it look like the onchange event is not executed, and it is needed in order to take the value to be used as the filter for the cascading component.
If I manually add the value to the text field and move to the next, the onchange event is fired and the cascading filter works fine.
Is there a way to force the onchange event when I assign a value to the text field? This is my code:
$(document).ready(function(){
var updateField = function(){
var something = window.top.fd.field('Entity').value(); //This is a lookup colum on the parent
var parentID = fd.getSourceID();
if (parentID) {
fd.field('ParentID').control().value(parentID);
$('.parent-field').hide();
}
fd.field('_x006e_bp4').value(something);
}
setTimeout(updateField,3000);
});
Thanks in advance for any help.