Forum Academy Marketplace Showcase Pricing Features

Search for specific database thing

I cannot seems to find the appropriate answer searching the forum.

I have a “category” database thing and an “activity” thing. I am trying to restrict my search of activities to a specific category (like with option sets), but I am not able to type in the category code (set up as the primary field). Is it possible to limit a search to a specific database entry.
image

Only with option sets can you directly pick them from the editor.

You can do Do a search for Category with the constraint being category code = [type your code] then do :first item

That would search your categories, find the one with the code you typed, and pick the first one found.

Thanks, but I am doing a search for an activity not a category and I am not able to enter the code, it just deletes the value. I have also tried to place a hidden input box searching for the category, but still cannot enter the code. Maybe I am misunderstanding your suggestion

In your screenshot the cpd_category field, is that type Category? In that box in the screenshot you have selected do Do a search for Category

Yes it is. In the activity thing I have a field referencing the category thing. The category thing has a text field for the code.
When I try it I still cannot add the text matching the code text of the data entry. I have a an activity search:
image

when I do a further search on the category it will not let me enter the code?
image
Maybe making the category code an option set with be easier?

Pressing enter didn’t keep the typed “arch1”? How about clicking out of that dynamic box and typing it to the right of that box.

It should let you, once you type it press close then do :first item on the search.

nope, just clears it

sorry hang on, typing out of the box seems to work

If it has that [Click] in grey backspace that away because my OCD hates seeing the dynamic box and typed stuff next to each other :joy:

If these categories are only really used for this purpose where you are hard coding different searches then maybe the option set is the way to go. Option sets have to be modified from the app editor and the changes pushed to live, vs datatypes you can have front end screen to add/edit/delete categories

Thanks for the tip, helps my ocd as well :slight_smile:

1 Like