SearchBox's value vs do a search for

Might need @josh to answer this one, but perhaps the community knows.

When you do a search in a native search box you are given access to “SearchBox’s value’s”.
I’m wondering if this means that all data associated with the search result has been pulled
and any further events would be faster using “SearchBox’s value’s FIELD” rather than a “Do a search for” constrained to match the result of the search box, or if being given access to “SearchBox’s Value’s” is simply convenience?

I did some rudimentary tests where I searched for a data type’s Field. I then put those 10 fields into a custom state and printed the value of the custom state on a page.

I did this in two columns, one with pulling “SearchBox’s Value’s” and one with “Do a search for” where the data type matched the search result.

The result, I couldn’t see any difference at all in speed, all entries show up on the page at the exact same time. Granted it’s a very small sample of 10 fields in a data type with 130 entries.

Since I couldn’t see any difference in speed, I guess it doesn’t have any real world implications, and this thread can be filed under “Saturday Curiosity” :slight_smile:

1 Like

Did you get an answer to this question? I was wondering the same thing!

If comparing the speed difference between getting the information from the search box or a do search, there shouldn’t be a difference as the two are doing the same thing; searching the database.

However, if, like the original poster is asking, is it better to use the search box to get the data or is it is better to use the search box and take that value and do a search for it, then the first is better as you are only performing one search instead of two.

If you use the search box to find a user you can then reference the search box value to get any field of data from the user found in the search box without needing to do a subsequent search.