-
Notifications
You must be signed in to change notification settings - Fork 92
Description
🚀 Feature
Build a control to be used in advanced search that can take a type and a list of fields for it to search on.
e.g. Type = 'Name', Fields = ['bride.name', 'groom.name']
This would render exactly like a normal name field search (or date field etc) but would just search on multiple fields instead of just the one.
The type is used to render the fields, so there will need to be validation to check that the fields in the list are all of the correct type.
Current configuration:
fields: [
field('residenceMember1.name', {
conditionals: []
}).exact(),
field('residenceMember1.dateOfBirth', {
conditionals: []
}).exact()
]Potential configuration:
fields: [
{
fieldId: 'my.multi.search',
type: FieldType.NAME,
configuration: {
type: 'fuzzy',
searchFields: ['residenceMember1.name', 'residenceMember2.name', 'residenceMember3.name']
}
},
{
fieldId: 'my.multi.dob',
type: FieldType.DATE,
configuration: {
type: 'exact',
searchFields: ['residenceMember1.dateOfBirth', 'residenceMember2.dateOfBirth', 'residenceMember3.dateOfBirth']
}
}
]Pitch
Currently, an advanced search field must be linked to a specific field id. i.e child.name.
Because of this, we can't search for any name in the declaration with a single search field.
Where this becomes particularly cumbersome is in the case of residence registration, where we have up to 30 residence members, each with their own field names. e.g. residenceMember1.name, residenceMember1.dob, residenceMember2.name, residenceMember2.dob etc
So to allow advance searching of residence members, we would need a separate control for every single member, up to 30.
Not only this UI bloat, but to search for a member, the user would have to know the order the members were saved. So if you didn't know they were saved as residenceMember5, you'd have to search in all 30 members to try to find the member.
Pre-condition
The field would be configured in Advanced Search in the country specific config.
Standard flow
The user would just see one field in the UI, like Bridal Party or Residence Member as per the above examples.
Then searching would check all relevant fields and return matches as per the normal advanced search functionality.
Variations/Exceptions
A type agnostic text input could be used, like the standard search.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status