How to create table? and how to search in wysiwyg field??

Collapse
X
Collapse
+ More Options
Posts
 
  • Time
  • Show
Clear All
new posts
  • emillod
    Active Community Member
    • Apr 2017
    • 1459

    #1

    How to create table? and how to search in wysiwyg field??

    Hello
    How to create table in entity? Something like this:http://i.imgur.com/wKPlUc7.png
    And how to search something in search field from Knowledge Base, where as description i have WYSIWYG field.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    Hello
    For every field you can set own view with own templates. Open these files for example.
    The problem is data of WYSIWYG field contains tags. You can create a function for tag stripping and notStorable field in entityDefs (open application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json the field amountWeightedConverted), after rebuild you can add it to search filters in Layout Manager.

    Comment

    • emillod
      Active Community Member
      • Apr 2017
      • 1459

      #3
      Can you be more specify which file i need to open, to see some example ?

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        <your_EspoCRM_DIR>/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json

        Comment

        • emillod
          Active Community Member
          • Apr 2017
          • 1459

          #5
          OK , so you want me to add:
          "notStorable": true,
          to field which is WYSIWYG?

          And also I don't understand this thing with table.
          Can you help me with creating table in entity?

          Comment

          • tanya
            Senior Member
            • Jun 2014
            • 4308

            #6
            no
            create another text notStorable field with "select": "STRIP_TAGS(<your_wysiwyg_field>)"; but you need to create function STRIP_TAGS in mysql

            tables: do you have Advanced Pack?

            Comment

            • emillod
              Active Community Member
              • Apr 2017
              • 1459

              #7
              tables: unfortunately no
              But this is exclusive option just for advanced pack ?

              How can i create function STRIP_TAGS in mysql? just another column in table or what?

              Comment

              • tanya
                Senior Member
                • Jun 2014
                • 4308

                #8
                No, just there you can find an example
                Search on the forum, how to set the view of the field
                https://stackoverflow.com/questions/...gs-from-record
                https://dev.mysql.com/doc/refman/5.7...procedure.html

                Comment

                • emillod
                  Active Community Member
                  • Apr 2017
                  • 1459

                  #9
                  Is there any chance to get this example code from you Tanya?

                  Comment

                  • tanya
                    Senior Member
                    • Jun 2014
                    • 4308

                    #10
                    Of course no. This extension is paid, I can not share the code

                    Comment

                    Working...