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

    OK, so you knew you were using ListGrid.searchForm. Here are the current docs for this property:

    When declared, the specified form is automatically used as a search form for this grid, with criteria that are additive with any criteria shown in the FilterEditor or Filter Window.

    For a discussion of the various filtering and criteria-management APIs and when to use them, see the Grid Filtering overview.

    This is similar to the effect of adding a filterEditorSubmit() override that pulls in criteria from the external form, and having the external form call filterByEditor() instead of fetchData(), as shown in the +exampleLink{additiveFilter} example.

    In particular. the grid will automatically filter when the or dynamicForm.submit() event fires on the form (happens if a SubmitItem is present and is pressed), and will automatically trigger filtering if enter is pressed in the form, as though searchOnEnter / saveOnEnter had been set.

    If the FilterEditor is enabled and listGrid.filterOnKeypress is set, the grid will automatically watch for searchForm.criteriaChanged(), and filter whenever that method fires. For the purposes of this behavior, the FilterEditor is considered to be enabled even if it is not currently visible but canShowFilterEditor is true (as otherwise filtering behavior in the form would change when the FilterEditor appears).

    The criteria from the specified searchForm will only be shown and edited in the external form; they will neither be shown nor editable in the FilterEditor, even if the FilterEditor also allows criteria on the same fields. That is, they are treated much like implicitCriteria.

    Note: when using listGrid.searchForm don't add your own logic to call fetchData() or the criteria you specify will appear in the FilterEditor and be editable there, potentially creating user confusion, especially if some of the criteria in your form cannot be displayed and edited in the FilterEditor.

    So, SearchForm is very useful when you just want to use the standard criteria that are provided by a SearchForm. If you want to modify those criteria in some way, you're in luck, because the docs for SearchForm explain exactly how it works, making it very, very easy to replicate it's behavior if you need to change something.

    Also, if you just click around a bit on those links, you immediately hit all kinds of clear information on how criteria are derived from form values, and how to customize that process.

    So given that you knew you were using this property and head read the docs for it, it is difficult to understand many of the things that happened in this thread:

    1. you kept talking about a mysterious second request from the comboBoxItem, when of course, this request is from the grid itself, because of your listGrid.searchForm setting

    2. you repeatedly mentioned problems with how the ComboBox fetches its data, and APIs, such as getPickListFilterCriteria(), that clearly affect how the comboBox fetches pickList data., when apparently the whole time the problem was the ListGrid's fetch initiated by listGrid.searchForm, where those APIs are irrelevant

    3. even though we repeatedly mentioned that the issue involves how the criteria get from the searchForm to the grid, you never revealed that this was being done via a listGrid.searchForm setting. We ultimately just guessed it! And, you also never looked into this area, never looked at the docs for searchForm.getValuesAsCriteria(), it would seem - just ignored the way that the docs and the Support team were point you right at the solution

    This whole trainwreck would have been avoided if your first question were something like: "I've got a comboBox in a SearchForm and I'm using listGrid.searchForm to include that criteria in a ListGrid. How can I customize the criteria applied to the listGrid?". Except of course, there wouldn't be a need to post that - because the docs for listGrid.searchForm already give you the solution.


    1. if you see some way in which the docs could be improved, please let us know. In the listGrid.searchForm docs, we see one method reference that could be made a live link. Other than that, we're looking to you for how it could be improved.

    2. please use ChatGPT as your first line support instead of this forum. We cannot afford to run in circles like this, especially for someone who doesn't have paid support. Note that ChatGPT basically answers our corrected version of your initial question immediately. However, with your original question, it heads off in the same wrong directions we did, as expected.


      I'm a bit astounded, please read the first sentence of the first message in this thread:

      Using SmartClientJS 13.0, I have a ListGrid with searchForm and in that SearchForm I have a ComboBoxItem where addUnknownValues is false.
      I'll cool down and react later.


        That does not say ListGrid.searchForm. It says a “ListGrid with searchForm”. Multiple members of our team, and a completely neutral AI, consistently read this as having a ListGrid and a SearchForm, and *not* as using the ListGrid.searchForm property.

        Also note that even if this particular instance of misunderstood phrasing is taken into account, it doesn’t even begin to explain all the other things that happened in this thread, such as, attributing the grid’s data request to the comboBoxItem, focusing on pickList-related APIs when you were trying to affect grid criteria, and so on.

        So perhaps your way of phrasing things, and your way of describing the problem, would be clear to another native speaker of your language - perhaps that person even thinks your way of phrasing in English is clear!

        But you completely baffled multiple extremely capable native speakers over here, and an AI to boot. This has happened a few times with you and we don’t want to do it again. It’s very costly.

        Note that you can speak to ChatGPT in all common languages. So if, perhaps, your way of phrasing would be clear to a native speaker if spoken in your native language, then you can use that kind of phrasing with ChatGPT in your native language and presumably it will understand. You can test that out.

        Finally, note that recommending ChatGPT is not some kind of “punishment”. We’re pretty much universally recommending that now as a first cut. You could have a Q&A with 20 different questions, answers and clarifications in an hour with ChatGPT, for free.


          Writing "searchForm" camel cased is even for me unnatural language. In the first message I wrote it like that - and yes - in later messages I've used "search form", assuming it was already clear we were talking about the "searchForm" property of the ListGrid.

          I didn't mean to unleash a discussion like this: I just though I might have discovered an inconsistency (or "bug" if I may even use that word). At the beginning of this discussion that was still unclear. So, it's not nice to hear what you are saying. I have purchased 3 or 4 licenses in the past and was considering buying the latest license.

          As I have said in other threads and maybe even this thread, sometimes the framework doesn't feel "intuitive" enough (for "me" I should add), but saying that seems to offend you very much.

          This discussion is going nowhere. So for now, I just want to know if it's allowed to ask questions again for others to answer, because I don't expect you guys to answer again. Other SmartClient users might answer as well, don't they?


            Yes, you have bought a license and renewal, however, if you consider the amount of free support you have received, and price it by our incident support pricing, we have taken a substantial loss on your account.

            This is especially true because this is not exactly the only "head-scratcher" thread we've had with you, where the ticket has been passed around with messages like "do you have any idea what he's asking?". Yes, you have had multiple people working on some of your questions, putting forward competing theories of what you might mean.

            But, we don't ban people for being difficult to help. At most, we might put a DontRespond marker on your account visible to our support team, meaning we've made the call that extending further free support just isn't worth it. With you, we've been close to that a couple times, then had a breaththrough and guessed what you were asking about. Because of this, you've received an unusual amount of free support.

            We will not, for now, add a DontRespond marker for you. But we're asking that you work on clarity, and take advantage of ChatGPT, partly as a means of improving clarity.

            Finally, this is a public forum, and if you critique the product and we think it's unfair, expect us to respond. We are not "offended" but we have a policy of correcting what we see as misinformation. If you don't want discussions like that, stick to concrete things like bugs, specific suggestions for improvement, feature requests etc, and the like.