Page 1 of 1
How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 12:28 am
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,
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 6:05 am
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
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 7:32 am
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
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 7:38 am
by kev1n
You can either pass a string value or a Hash Cookie.
E.g.
See
Wiki documentation
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 7:45 am
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 ?
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 7:56 am
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.
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 8:00 am
by yvesf
very clear, thx

Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 8:22 am
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 ?
Re: How to filter a list in an iFrame
Posted: Sun Dec 12, 2021 8:45 am
by kev1n
Separate multiple search terms by a space.
E.g.
Filter: