Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Hi Isomorphic,

    I can see the change in the docs here, thanks.

    Best regards
    Blama

    Comment


      #17
      Hi Isomorphic,

      Thanks for the build, that fixed my error and it all works now.

      I tried creating a SimplyType because I use the same operators on multiple fields but I run into this error:

      Error 1:
      Click image for larger version

Name:	Error1.png
Views:	48
Size:	186.9 KB
ID:	268146
      Error 2:
      Click image for larger version

Name:	Error2.png
Views:	38
Size:	140.9 KB
ID:	268147
      SimpleType Example:
      Click image for larger version

Name:	SimpleTypeExample.png
Views:	44
Size:	60.0 KB
ID:	268148
      DataSourceField Example:
      Click image for larger version

Name:	FieldExample.png
Views:	41
Size:	10.3 KB
ID:	268149
      Index Location:
      Click image for larger version

Name:	index.png
Views:	40
Size:	15.6 KB
ID:	268150
      Folder Locations: (DataSources are in SQL folder)
      Click image for larger version

Name:	FolderLocation.png
Views:	40
Size:	24.8 KB
ID:	268151

      Any help would be great :)

      Regards

      Comment


        #18
        Hi zhene,

        you need to tell the framework where to look for .ds.xml files, you do this in server.properties by editing project.datasources:
        Code:
        project.datasources: $webRoot/ds, $webRoot/types
        Adjust this to your folder names.

        Also, I'd load all your Types/DataSources in one call, as you have no hard guarantee that the Types call will be faster than the DataSources call. Just list the Types before any DataSource in the query string.

        Best regards
        Blama

        Comment


          #19
          Thanks Blama, that is what I was missing.

          I have noticed that all assigned operators are not shown in the selection.

          Grid Operators:
          Click image for larger version

Name:	availableOperators.png
Views:	44
Size:	11.7 KB
ID:	268160

          Assigned Valid Operators:
          Click image for larger version

Name:	FieldExample.png
Views:	37
Size:	72.1 KB
ID:	268161

          ListGridField:
          Click image for larger version

Name:	gridFIeld.png
Views:	34
Size:	91.3 KB
ID:	268162

          I assume that since we're using type="integer" but displaying type="text" the operators are getting confused?

          Let me know what you think :)

          Best Regards


          Comment


            #20
            Hi zhene,

            I'm pretty sure the capitalisation of the 1st two is wrong Equals->equals and NotEqual->notEqual.

            Can you have a look what difference this makes?


            Best regards
            Blama

            Comment


              #21
              Hi Blama

              Thanks for pointing that out. That did solve some of the issue, but I still don't see all the assigned operators.

              Isomorphic Do you have any suggestions?

              Comment


                #22
                In the code snippet above, you have set validOperators on a hidden field. This field is not displayed. Set them on the field that is displayed to make them work.

                Comment


                  #23
                  Isomorphic If you see the field above that, I have labelId which is the field I use in the grid and display the field label. label is the field displayed.

                  Removing hidden="true" has no effect.

                  I did notice that if I switch from using a ComboBoxItem in the ListGridField to a SelectItem, I don't get any options for filtering. Please see the attached images:

                  Click image for larger version

Name:	Screenshot 2022-07-21 102815.png
Views:	39
Size:	7.7 KB
ID:	268375Click image for larger version

Name:	Screenshot 2022-07-21 102832.png
Views:	27
Size:	25.4 KB
ID:	268376

                  Why does SelectItems not work for filtering and comboBoxItems not display IN_SET and NOT_IN_SET filtering operators?​

                  Comment


                    #24
                    What interface are you hoping for here?

                    If you consider an ordinary string field (no valueMap and no related DataSource) and the inSet/notInSet operator, the UI to allow people to use such an operator might involve a pop-up where you can input multiple string values. This is not a built-in UI we have right now (although note: you can do this via https://smartclient.com/smartclient-...pressionFilter).

                    If you were instead hoping that, since this is an FK field, when you pick inSet, the interface switches to a databound multi-select, this also isn't built-in (yet) and has some pretty interesting complexity to it, because:

                    1. we'd need to switch to a SelectItem and yet preserve the ability to switch operators with an icon to the left

                    2. the criteria generated are now criteria on the FK field, not on the displayField. This means the UI would be generating criteria for different fields depending on the chosen operator.
                    So which "validOperators" apply?

                    In sum, not every operator has a pre-built UI for this specific style of filtering, however, expressionFiltering and the FilterBuilder are other options if this kind of criteria is common in your app.

                    You could also consider Feature Sponsorship to add more built-in modes.

                    Comment


                      #25
                      Thanks, that makes sense.

                      Those features would be nice.

                      I will try and make expressionFiltering work. That at least allows me to see the IN_SET and NOT_IN_SET operators as options now. I'll have to do some custom handling to get the filter to work but at least I'm closer.

                      Thanks again

                      Comment

                      Working...
                      X