Reduce Lookup results

Questions related to using nuBuilder Forte.

Re: Reduce Lookup results

Postby kev1n » Wed Feb 12, 2020 12:36 am

I don't have time to look through everything right now.

Is Form_Gestion_Intervenants a run object? onchange doesn't seem to be triggered for this kind of object. Therefore we need to place the code somewhere else (maybe in the form's custom code field)

Another thing to check in the meantime. If you paste and execute this code in the developer console (F12), will you get a value back?

Code: Select all
$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val()
kev1n
 
Posts: 474
Joined: Mon Oct 15, 2018 2:13 am

Re: Reduce Lookup results

Postby joecocs » Wed Feb 12, 2020 1:26 am

thanks again for your help,

I tried to put the code in the 'custom code field' with the following code:
Code: Select all
if(!nuMainForm() && nuFormType() == 'edit') {
   
    nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
}


but it doesn't work either.

I tested in the debug console and I have my reference !!!

I would like to do otherwise to test, can we get my reference which is in the Run :: Frame to assign it to a field in the 'MainForm'?

Capture d’écran 2020-02-11 à 16.51.18.png
Get the ref to the text in MainForm
Capture d’écran 2020-02-11 à 16.51.18.png (68.36 KiB) Viewed 36 times


So I can get away with a pirouette !

Thanks
joecocs
 
Posts: 30
Joined: Wed Jul 04, 2018 11:41 pm
Location: France

Re: Reduce Lookup results

Postby kev1n » Wed Feb 12, 2020 1:40 am

Is the form type really edit or is it browse?

Could you try each of these different codes to see if an alert box is displayed?

Code: Select all
if(!nuMainForm() && nuFormType() == 'edit') { 
    alert("hello!");
    nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
}



Code: Select all
if(!nuMainForm() && nuFormType() == 'browse') { 
    alert("hello!");
    nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
}


Code: Select all
if(nuFormType() == 'browse') { 
    alert("hello!");
    nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
}



Code: Select all
if(nuFormType() == 'edit') { 
    alert("hello!");
    nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
}
kev1n
 
Posts: 474
Joined: Mon Oct 15, 2018 2:13 am

Re: Reduce Lookup results

Postby joecocs » Wed Feb 12, 2020 2:18 am

So The mainForm is Browse & edit, the first Run::Frame is Browse & edit and the second Run::Frame is Browse & edit type.

in the first code i've the alert when i select 1 line in my first Run::Frame.
in the second code i've the alert when my mainForm is in edit mode and the first Run::Frame is filter (is the same time).
in the third code i've the alert when my mainForm is in edit mode and the first Run::Frame is filter (is the same time).
in the last code i've the alert when i select 1 line in my first Run::Frame.

But the second Run ::Frame is not refresh or filter... :cry:

can we get my reference which is in the Run :: Frame to assign it to a field in the 'MainForm'?
joecocs
 
Posts: 30
Joined: Wed Jul 04, 2018 11:41 pm
Location: France

Previous

Return to General



cron