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
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 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).
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ā¦
@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?