Announcement

Collapse
No announcement yet.

[SOLVED]Field Text-Autocomplete return empty value on ajax event

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

  • [SOLVED]Field Text-Autocomplete return empty value on ajax event

    in a form-type application, a text-autocomplete field with select2 option selected, on event ajax onChange, the "Code" value of the field is not retrieved, it returns empty. Try an echo {Code};

  • #2
    Did you check if what is returned is always the "previous" value?

    E.g.
    - initially the field is empty, you change its ​​​​​value to 1 and the onChange triggered echo shows en empty value.
    - you then change the field value to 2 and the echo shows 1.

    if that's the case I have a workaround
    Last edited by robydago; 02-28-2019, 07:31 AM.

    Comment


    • #3
      no value returns. Only empty field.

      Comment


      • #4
        Hello, sorry for the delay. We have reported this issue to our development team.
        Best Regards,
        Rafael Herculano

        Bug Tracker Team
        Netmake - IT Solutions

        Comment


        • #5
          Rafael Herculano

          While you're at it,
          Select2 have other issues as well: often they are not rendered correctly.
          To me this happens on apps opened as modal and as a workaround a manual or prograrmmatically-triggered reload of the iframe fix it.

          This issue has been reported repetedly on this forum.

          One example:
          https://forum.scriptcase.net/forum/m...few-characters

          Comment


          • #6
            Hello, this problem about text-autocomplete was solved. Please, tell me more about this issue. Give us more details.
            Best Regards,
            Rafael Herculano

            Bug Tracker Team
            Netmake - IT Solutions

            Comment


            • #7
              Rafael Herculano

              The issue is that Select2 elements are not rendered correctly on the screen, as you can see in the screenshot this user posted:

              Code:
              https://forum.scriptcase.net/forum/main-category/main-forum/84113-select2-fields-displaying-only-first-few-characters
              As you cae see, Select2 elements are very small and basically unsuable.

              To me it seems to happen mostly (maybe only?) when forms are run as modal.

              When that happens, a reload of the frame (e.g. right click\reload frame in Chrome) fix the issue as Select2 elemets are then rendered correclty.


              I've also seen the following ajax issue for Select2 (both select and automplete): ajax code reading a Select2 field value, would always get the "previous" value of the field.
              Eg: at app execution the Select2 field is initially empy. The field is changed to "1" and an SC ajax event (just echoing the field value) is triggered. The Ajax code woud echo empty (i.e. the value before the change). The field is now changed to "2". The Ajax code woud echo "1" (i.e. still the value before the change). And so on.
              By just editing the app and changing the field to a normal Select, the ajax code will start working as expected.

              Comment


              • #8
                Create a field like text-autocomplete example: {citta} with a query of the type: SELECT Code, Description FROM ....
                On an AJAX onChange event, retrieve the value with sc_ajax_message ({citta}, ""); You will notice that the first selection returns an empty value, if we select a second time the value is detected.

                Comment


                • #9
                  kkkpe

                  And if you select a different value the third time, the second (previous) value is detected? An so on?
                  If so, that's the same issue I was describing

                  Comment


                  • #10
                    Hello, about this i'll verify and tell you. Thank you for these feedbacks, it's helpful for solve issues.
                    Best Regards,
                    Rafael Herculano

                    Bug Tracker Team
                    Netmake - IT Solutions

                    Comment


                    • #11
                      Gentlemen of ScriptCase, can you update as soon as possible to solve this blocking problem? Thank you

                      Comment

                      Working...
                      X