Welcome to the nuBuilder Forums!

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

How to filter a list in an iFrame

Questions related to using nuBuilder Forte.
Post Reply
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

How to filter a list in an iFrame

Unread post by yvesf »

I have created a launch form containing 2 things : a date and an iframe.
The iframe is linked to a browse list containing in the first column a nudate.
I would like to create a button on the right of the input date field. This button should filter the browse list in the iframe with the date value in date field.
Capture.PNG
Behind the button, I have a create a run object which is a button.
Capture1.PNG
and the code behind "on click"
Capture2.PNG
It doesn't filter the list below and the date put in the input box is cleared.
Could you please help ?
Many thanks,
You do not have the required permissions to view the files attached to this post.
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: How to filter a list in an iFrame

Unread post by miasoft »

Use nuFiterRun onclick (may be onchange for acc_date field):
nuFilterRun('YourIframeObj', '#acc_date#')
YourIframeObj - object on your form ("run" type). It run your browse by iFrame-method
Wbr, miasoft.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to filter a list in an iFrame

Unread post by yvesf »

That's works perfectly. Thx.
What is the attended value in the filter field if we don't use JavaScript ?
Capture.PNG
Where can I find the documentation explaining that ?
Thx
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to filter a list in an iFrame

Unread post by kev1n »

You can either pass a string value or a Hash Cookie.

E.g.

Code: Select all

#acc_date#
See Wiki documentation
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to filter a list in an iFrame

Unread post by yvesf »

In fact I have to put the field on which I would like to filter (see attachments) + .nuFilterRun('acc_agenda_frame', '#acc_date#') on change event of acc_date field.
Capture.PNG
Capture1.PNG
Is it normal I have to do both ?
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to filter a list in an iFrame

Unread post by kev1n »

1. Picture: The filter will be used when the object is created
2. Picture: The JS is required to refresh the iframe whenever the date is changed.
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to filter a list in an iFrame

Unread post by yvesf »

very clear, thx :D
yvesf
Posts: 315
Joined: Sun Mar 14, 2021 8:48 am
Location: Geneva
Has thanked: 87 times
Been thanked: 11 times

Re: How to filter a list in an iFrame

Unread post by yvesf »

In addition to filter on date field, which is working perfectly, I would like to filter on the name. Is it possible to filter on multiple criteria ?
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: How to filter a list in an iFrame

Unread post by kev1n »

Separate multiple search terms by a space.

E.g.

Filter:

Code: Select all

#acc_date# #acc_name#
Post Reply