Announcement

Collapse
No announcement yet.

search in related fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • search in related fields

    1. Create entity1 and entity2, relation one to many entity1 <-> entity2, use multiple fields in relation

    Click image for larger version

Name:	2022-07-11 12_13_05.png
Views:	238
Size:	8.4 KB
ID:	81508


    2. add entity2 fileld in entity1 list layout

    Click image for larger version

Name:	2022-07-11 12_13_53.png
Views:	185
Size:	14.0 KB
ID:	81509


    3. Search in entity1 list do not handle entity2 field content

    Click image for larger version

Name:	2022-07-11 12_14_57.png
Views:	194
Size:	4.8 KB
ID:	81510

  • #2
    you need to add the field on the search parms on entityManager or enable fullSearchText to resolve this.
    Rabii
    Web Dev

    Comment


    • #3
      Hi iioi,

      User rabii gave you a good advice.

      And I would like to recommend you, in addition, a slightly different solution, perhaps it will suit you.

      Go to Administration > Entity Manager > [your_entity] > Layouts > Search Filters and drag the field you need to search from Disabled column to the Enabled column. There can be many fields in this column, there are no restrictions.
      Now, when you go to your entity's records List View (as on the screenshot), click on the ellipsis next to the search icon and select the required field.
      Then, you can use for search the operators Is, Is Not, Not Empty, etc.

      You can learn more about searching in EspoCRM here:
      https://www.espocrm.com/tips/search-types/,
      https://docs.espocrm.com/user-guide/text-search/.

      Comment


      • #4
        Originally posted by rabii View Post
        you need to add the field on the search parms on entityManager or enable fullSearchText to resolve this.
        I'm very sorry, but what is "search parms" ? there is no "search parms" in documentation and google for "espocrm search parms" give no relevant results.
        Text Filter Fields in entity does not allow to select Entity2 field (in attach)

        Enabling fullSearchText with rebuild gives no result.

        Comment


        • #5
          Originally posted by lazovic View Post
          Hi iioi,

          User rabii gave you a good advice.

          And I would like to recommend you, in addition, a slightly different solution, perhaps it will suit you.

          Go to Administration > Entity Manager > [your_entity] > Layouts > Search Filters and drag the field you need to search from Disabled column to the Enabled column. There can be many fields in this column, there are no restrictions.
          Now, when you go to your entity's records List View (as on the screenshot), click on the ellipsis next to the search icon and select the required field.
          Then, you can use for search the operators Is, Is Not, Not Empty, etc.

          You can learn more about searching in EspoCRM here:
          https://www.espocrm.com/tips/search-types/,
          https://docs.espocrm.com/user-guide/text-search/.
          It's not an option.
          You can't force employees to serach one thing in one way and other but close the same thing in other way.

          Comment


          • #6
            iioi,

            It seems to be that without changing your instance files, you won't get the solution you want.

            For example, with the One-to-Many relationship that your entities currently have, you can set up the Text Filter Fields while editing Entity2 to search Entity1's name and other fields. But not vice versa.

            Comment


            • #7
              Originally posted by lazovic View Post
              iioi,

              It seems to be that without changing your instance files, you won't get the solution you want.

              For example, with the One-to-Many relationship that your entities currently have, you can set up the Text Filter Fields while editing Entity2 to search Entity1's name and other fields. But not vice versa.
              I think you are right, that's why I post it in "feature request".

              Can you please direct me to instance files to be change ? May be I can do it by myself.

              Comment

              Working...
              X