-
Notifications
You must be signed in to change notification settings - Fork 105
Search is not working when using attributes from other tables #148
Comments
Hi @facundofarias , could you provide some examples of what you tried to implement the search on your Smart Fields? In an operational point of view, about your example, why don't you search directly in the |
Hey @arnaudbesnier, We do have a Users table in which, of course, the search can be done using the Email field, and also we have created the Smart Relationships, so once I found the user that I am interested, I can navigate to the other relationships. But in this case, let's suppose we have another table called Invoices, in which we have a field called UserId -> In this case, the users want to search by Email, not by UserId. So, if we search by UserId, yes, we got the results. Now, if we try to search using the Email field, no results are shown. So, basically, how can we achieve that? We kindof done it by creating views, that contains all the fields (including the Email), and thus, the search is working. But it's a workaround, we don't think it's the proper solution. More or less do you understand our use case? |
Hi @facundofarias , About your Invoices example if the userId is a "native" belongsTo (ie not a Smart BelongsTo) then if you want to search on Users.email from the Invoices you can activate the "extended search". You can do that from the footer of the Invoices table view. Now if you are in the case of a Smart BelongsTo, then the search implementation of the Smart BelongsTo is more complex than the simple example provided in the documentation. You need to be able to manipulate the As you're not the only person to ask for such example, we'll work on this. |
@arnaudbesnier exactly, that's our problem! |
Hi, Any updates on this. We also need an example for Search on a Smart Relationship. Thanks. |
No idea! @arnaudbesnier Was the article published? Where is it? |
Hi @facundofarias Reading the full conversation, it looks like your have a "native" configuration:
If so you can activate the extended search for the Forest Admin panel and everything should work as you expect to. Is that you case? Maybe you could share you |
Hallo there,
I've read these docs hundred of times, trying to make it work, but still I am encountering issues. Following the documentation, it's quite straightforward to search in a Smart Field, that's OK.
But in our case, let's suppose we have a table of Pets, with all the information about each pet. If we want to search for a given pet, it's fine, we just use ForestAdmin UI, and it's all good. The problem is, if we want to search for example, using the Pet Owner's name, which is stored in a different table, and in the Pets table we have its ID only.
I think it's a common scenario to cover, since for example all our CS agents want to search on all the tables by Email (the easiest way to identify a given customer), and like Stripe does, show all the results related to that email.
I've been trying to find samples implementing this scenario, since I know big companies like Hitch are using it, but I couldn't find none. Can you provide an example? I can also share with you what I have done, but is not working :/
Thanks,
Facundo
The text was updated successfully, but these errors were encountered: