Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Reduce Lookup results

Questions related to using nuBuilder Forte.
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

Sorry,

after several attempts and having browsed the forum out of curiosity, I found this thread :

https://forums.nubuilder.cloud/viewtopic.php?f=19&t=10130

explaining what I am trying to do to assign values ​​to objects in an iframe but i have another question, what is the syntax in JS to assign the value of one object in another in the same form ?

Thank
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Reduce Lookup results

Unread post by kev1n »

Code: Select all

$('#your_object').val($('#other_object').val());
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

Thank's
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Reduce Lookup results

Unread post by admin »

joecocs,

There is a new JS function available to change the filter on Run::iFrames https://wiki.nubuilder.cloud/ ... uFilterRun

Code: Select all

nuFilterRun('bbb',$("#aaa").contents().find("#cus_phone").val())
(This filters an iFrame from the value in another iFrame)
nufil.png

Steven
You do not have the required permissions to view the files attached to this post.
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

Thank's Steven,

But where i put this code, in JsScript of 'bbb' or in 'aaa' or in Filter of 'bbb' ?

after several tries I can not find how to integrate this code ... :?

i'm a newbie :oops:
admin wrote:joecocs,

There is a new JS function available to change the filter on Run::iFrames https://wiki.nubuilder.cloud/ ... uFilterRun

Code: Select all

nuFilterRun('bbb',$("#aaa").contents().find("#cus_phone").val())
(This filters an iFrame from the value in another iFrame)
nufil.png

Steven
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

I am trying to learn to use 'nuBuilder', 'Jscript' and 'PHP' at the same time, but there are logics which I do not master yet... :oops:

if you would help me understand where to integrate your command 'nuFilterRun ', :geek:

thank you.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Reduce Lookup results

Unread post by kev1n »

You can add an onchange event to an object and call nuFilterRun() to refresh the run object (Iframe).

https://wiki.nubuilder.cloud/ ... ustom_Code


Don't forget to replace aaa and bbb with your Object Ids.
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

Thanks Kev1n,

I tried but it doesn't work. :cry:

When I select a record in Frame 'aaa', the frame 'bbb' is not filtered or refreshed. :roll:

That's why I'm a bit lost on the nuBuilder mechanisms.

To be a little more specific about what I want, here are 3 photos:

I wish in a dossier for construction sites,
Dossier.png
I choose or I create a contributor in the dossier (customer, suppliers, communities, manufacturers), I can have several in this dossier and they can be in other dossiers.
Intervenants.png
and when I select a contributor, I would like to see the file of this contributor in the Frame below, but it doesn't work.
Tiers.png
If it can work, it will allow me to filter a list of contacts for this contributor in the 'Contacts' tab.

Just for the complete explanation, the diagram of my database
Capture d’écran 2020-02-11 à 09.53.56.png
The principle seems simple, with MS Access I know how to do it, but here I am a little confused, so if you can help me on an early solution :)
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Reduce Lookup results

Unread post by kev1n »

What does your Javascript code look like?
joecocs
Posts: 67
Joined: Wed Jul 04, 2018 4:11 pm
Location: France

Re: Reduce Lookup results

Unread post by joecocs »

In the mainFORM, in the list of objects in the first Run::Frame:
List objects.png
in the Javascript Code onchange event:
JScript onchange.png
I've :

Code: Select all

nuFilterRun('Form_Gestion_Tiers',$("#Form_Gestion_Intervenants").contents().find("#Ref_Tiers_Intervenants").val());
The “#Ref_Tiers_Intervenants“ is a lookup 'Tiers' seen in my previous post in third picture

Thanks for your time
You do not have the required permissions to view the files attached to this post.
Post Reply