Page 2 of 2

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 6:46 pm
by ltrannoy
In the subform, I have 2 dependent Lookup fields: L1 and L2

In the parent field, I have a hidden field.
This hidden field is used to filter the search table of L2

I have assigned a Hover event on L2
The Hover event of L2 assigns the value of L1 to the hidden field

So when we click on L2, the query filters on on the value of the hidden field (corresponding to the value of L1 therefore)
The Hover event only works on the added line just after saving the form. This does not focus on the extra lines.

Max

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 7:41 pm
by toms
Hi,
I have assigned a Hover event on L2
It remains unclear how the event is applied (Javascript code?) And I guess that you need to reset it whenever a new row is inserted.

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 7:59 pm
by ltrannoy
Hi,

My JavaScript code in the form :
$(document).ready(function () {

$("div[id$='customer_idbutton']").hover(
function () {
$('#delivery_id2').val(nuSubformValue(this,'delivery_id'));
}
);

delivery_id2 is an hidden field

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 8:59 pm
by toms
I think you need to set the hover again after a new row has been added.

Check out the afterinsertrow event.

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 10:02 pm
by admin
I concur.

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 10:10 pm
by ltrannoy
Thank you,

It's perfect like that!

Max

Re: The Lookup field of the lower lines are inactive in the

Posted: Wed Feb 07, 2018 10:21 pm
by admin
.