Hi,
Will it be possible to filter the content of a subform based on the date in the parent form ?
Many thx,
Yves
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
How to filter subform with value in parent form Topic is solved
-
- Posts: 347
- Joined: Sun Mar 14, 2021 8:48 am
- Location: Geneva
- Has thanked: 94 times
- Been thanked: 12 times
How to filter subform with value in parent form
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4562
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 528 times
- Contact:
Re: How to filter subform with value in parent form
Yes, subforms support filtering. I'll share an example shortly.
-
- Posts: 135
- Joined: Tue Dec 12, 2017 11:28 pm
- Location: Aberdeen, UK
- Has thanked: 9 times
- Been thanked: 13 times
Re: How to filter subform with value in parent form
Hello Yves,
There is a function in nuBuilder that lets you add filters to one or more columns in a subform. Let's assume that your subform is called sf_one and you wish to filter on columns one_date and one_patient.
You can add this JavaScript to the custom edit code and it should do the job for you.
In this example, the date filter will offer every unique date in a select object. The patient search will be in a text object with datalist completion.
I hope this helps.
Neil
There is a function in nuBuilder that lets you add filters to one or more columns in a subform. Let's assume that your subform is called sf_one and you wish to filter on columns one_date and one_patient.
You can add this JavaScript to the custom edit code and it should do the job for you.
Code: Select all
var sfFilterSpecs = {};
sfFilterSpecs['sf_one'] = {
'one_date': { type: 'select', blank: false } ,
'one_patient': { type: 'search', datalist: true, blank: true }
};
nuSubformAddFilter(sfFilterSpecs);
I hope this helps.
Neil