Searching multiple Option Sets

Hi everybody, I am at my wits end, please help.
I am working on an app where users can create their profile by choosing from lists of options (e.g. countries lived in, languages spoken).
Based on the bootcamp I took I defined the options as option sets. BUT now I find out option sets are not searchable?!? Yes/No? That search is at the heart of my app! What might be a good solution? Please any help would be very much appreciated. Just another newbie :frowning:

1 Like

Do you mean searchable by the Users using the application?

You can have them select it by dropdown, where it pulls the list of available options. I believe your thinking is correct with optionsets from what you described. Where in the process are you running into trouble?

Thanks for your answer. Yes, indeed searchable by the user. Example: if typing ā€œGermaā€ the ideal search function would find Germany (country lived in) and German speaker (language spoken). One general search field would allow the user to search in several options sets at the same time. But indeed your idea of dropdown does solve the problem even if it forces the user to make a decision about which option set to search. Definitively better then having a non-working search function :slight_smile: Thanks

You donā€™t ā€˜searchā€™ for options, as they arenā€™t in the database - thatā€™s one of the advantages of using them.

But you can match a text input to an optionā€™s attribute in the same way you can with a database entry - use the ā€˜get all optionsā€™ expression and apply a filter to match the specific attribute with the text input.

I would agree that in many cases itā€™s better and easier to use some type of pre-defined selection (i.e. dropdown, selectable icons etc.) to make sure there is a match - but in your case, as you want to match multiple option sets, you can use a text input so you users can find various options that contain the inputā€™s value (the same as you would with database entries).

4 Likes

thanks my issue has been fixed.

thanks

Hey @adamhholmes,

My name is Ren and I just ran into a similar problem. I wanted to see if you could share some screen snips of how I can create a search function that allows my users to search an option set. I attempted to follow your solution above, but it wouldnā€™t allow me to search, but instead, it displayed my option set and the options inside of it.

It really depends on what youā€™re trying to doā€¦

But you can just apply a filter to the option set, and then add whatever constraints you need there (for example, matching an option setā€™s display to an inputā€™s value)ā€¦

Hereā€™s a simple exampleā€¦

4 Likes

@adamhholmes - wondering if you can expand on this a bit. Iā€™ll give you an example of what Iā€™m trying to do and maybe you can help me get my search working?

Letā€™s say users can post music ITEMS for sale. Items have several attributes including FORMAT. Format is an option set containing several options - cassette, 8-track, vinyl, CD, etc. Each option has several attributes - format name, format logo, format type (analog or digital), etc.

If I wanted to let users search music item postings using a dropdown for Format Type (analog or digital), I essentially need a search saying: fetch all ITEMS where ITEM.FORMAT.FORMAT TYPE = ā€œdigitalā€

Can I achieve this with a single ā€œformatā€ field on the ITEM data type? Or do I need to add fields to ITEM for everything Iā€™d conceivably want to search on (e.g. format type)? Make sense? Thanks in advance!!!

UPDATE: Sorry, somehow I completely missed your latest note with screenshot before writing my question here. Is your suggestion the same if I want to ā€œDo a Searchā€ to retrieve my data, and item.Format.FormatType (in my example) is only one of several search criteria I wish to target?

1 Like