1 2 Previous Next 16 Replies Latest reply on Jul 11, 2019 1:40 PM by MegamanX

    Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA

    Ashiwn

      Hi All,

               Good Afternoon.

       

      I have an oracle apex page with these columns Score, EPrintID, UoA, LeadEprintID and Personno.

      The users come in and score using a drop down list under the Score column.

      I have a functionality when a user scores in a row and if there are same EPrintID and UoA in the same table then it should automatically update the selected score in the rest of the table where the EPritnID and UoA are same. I am using Javascript for this and its working.

      Now the Lead EPrintID column - This column is nothing but when the user types in the EPrintID which is already scored then it should take the Score for that EprintID and update the table automatically with that score. I use Javascript for this.

      Check out the page from the below Link you might get a better understanding.

       

      LeadEpritnID.PNG

       

      In the LeadEPrintID column when the user starts typing i want the list of values to show up so that the users can select the EPrintID which they want to enter rather than typing the whole thing. I Used Text with Autocomplete for this and then Used LOV using a Sql Script to get the list. The list is showing up but the javascript functionality to update the scores is not working in 18.2 but works in 5.1.4.

      It works in 18.2 if i change the type to Number but the issue is i don't know how to create LoV when you change the type to Number.

      LOV_LeadEPrintID.PNG

      It was working fine in Apex 5.1.4 after we upgraded to 18.2 it stopped working.

      In the below page link i have the functionality working but using type Number without the LoV.

      I want the LeadEPrintID coloumn to have LoV and also update the score column with the score for that entered EPrintID in LeadEPrintID coloumn

      Any idea or help will be much useful.

       

      User ID : User

      Password: Redcarpet007

      https://apex.oracle.com/pls/apex/f?p=83223:4:100877929740422:::::

       

      Thanks

      Praveen

        • 1. Re: Oracle Apex 18.2 - Issue with LoV and Text with Autocomplete
          Ashiwn

          Update : To make it simple. I tried creating a Dynamic action( Execute Javascript )  with Event 'Change' in the column having the type 'Text with Autocomplete'. It works in 5.1.4 and not in 18.2.

          It works if i change the Type to 'Text' or 'Number' but i have to use 'Text with Autocomplete' so i can get List of Values when the users types in a value.

          • 2. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
            Ashiwn

            Is that a Bug...... Any idea ? 

            • 3. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
              Jorgelina1

              Your inquiry popped out while I was trying to figure it out if the praetius lov enhanced had any issues with apex 18.2;  so I wonder is this a LOV item plugin, the Praetius one? thanks!

              • 4. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                Ashiwn

                Thanks for getting back Jorgelina. Its not a plugin.  In the IG under the column i have the type as 'Text Field with Autocomplete' and for the List of values i have used a SQL Script.

                Find the below Screenshot. I have created two Dynamic actions under the column and i use JavaScript for that when there is a change action.

                This was working fine in 5.1.4 but once we moved to 18.2 it stopped working.

                 

                LOV.PNG

                • 5. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                  Ashiwn

                  Is anyone having the same issue ?

                  • 6. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                    Jorgelina1

                    Hi,

                     

                    I think I do not fully understand the issue.

                    If you set it up as text with autocomplete, this feature specifically works, correct? I mean, they can type numbers in, and a list will be shown. Right?

                    The issue is with the jscript.

                    How have you defined your jscript? Was a DA before in 5.1 ? How was the DA set up? I do not know if something changed for 18.2 in this regards, but we could look at it, and see what needs to be done in order to make it work again...

                     

                    Also, if you do not want people to type anything BUT numbers in the text field, this could be easily achieved...

                    • 7. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                      Ashiwn

                      If you set it up as text with autocomplete, this feature specifically works, correct I mean, they can type numbers in, and a list will be shown. Right  - yes you are right this works but say for example i have a JavaScript which pops out an alert message when it matches some condition it does not pop out the alert message.

                       

                      Just say for example I have put up an alert message like this. If there is any change in the column no matter what you type or select when there is a change in the column it should pop out an alert message.

                       

                      Column Type: Text With Autocomplete

                      Dynamic Action - Event Change in Column

                      JavaScript- alert('Any change');

                      for an action change in the column it does not work. it does not pop out the alert message.

                       

                       

                      But say if you set up in this format

                      Column Type: Text Field or Number or select List

                      Dynamic Action - Event Change in Column

                      JavaScript- alert('Any change');

                       

                      This works and pops out the message.

                      AnyChange.PNG

                       

                       

                      This is my Java code:

                      {code: Java}

                      /////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                      //

                      // This code gets called when a user updates a RATING.

                       

                       

                      // All rows RATING column weill get updated where the UOA and EPRINTID match the updated rows UOA and EPRINTID.

                      //

                      /////////////////////////////////////////////////////////////////////////////////////////////////////////////////

                       

                       

                      // First get the interactive table as a model

                      var model = apex.region("emp").widget().interactiveGrid("getViews", "grid").model;

                       

                       

                      // get the interative tables column keys we are ineterested in

                      var uaoKey = model.getFieldKey("UOA");

                      var epIdKey = model.getFieldKey("EPRINTID");

                       

                       

                      // get the new rating the user has selected

                      var selectedLEP = $('#ID_LEP').val();

                       

                       

                      // get the UOA and EPRINTID for the row the user has selected

                      var uoa = $('#ID_UoA').val();

                      var epId = $('#ID_EP').val();

                       

                       

                      console.log("Looking for " + uoa + " epId " + epId);

                       

                       

                      // for every row in the interactive table

                      model.forEach(function(r)

                      {    

                          //does the UOA and EPRINTID match the new rating rows UOA and EPRINTID?

                          if (r[uaoKey] == uoa && r[epIdKey] == epId)

                          {

                              // we have a match, update the RATING column in this row with the users new RATING.

                               model.setValue(r, "LEAD_EPRINTID", selectedLEP);             

                          }

                      });

                      {code}

                       

                       

                      This works in 5.1.4  and it is set exactly the same in 18.2.

                      • 8. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                        Jorgelina1

                        Hi PraveenSwa,

                         

                        I need to know how you have setup your DA, can you to take a screenshot?... this was an INTERACTIVE GRID, right?

                        I will check again in the page you set up before...

                        • 9. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                          Jorgelina1

                          Hey,

                           

                          I checked on the jscript, have you debugged this step by step?

                          I do not fully understand what it does, but at least the console threw an error, like something is not right there... But as far as I know, this is executing, if the page you set up in the apex.oracle.com section is with a "text with autocomplete" item, then I see it is being triggered your DA... but has an error in there... with this line:

                           

                          console.log("the rating for THE LEAD EPRINT ID IS " + eprintIdrating.d);

                           

                          specifically:   eprintIdrating.d   (".d" is what it does not understand)

                           

                          Which might be the reason why is not fully working.

                          Regards.

                          • 10. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                            Ashiwn

                            Hey,

                            Check this link.

                            All i set up is an interactive Grid with 5 columns.

                            in one of the columns i have set up a Dynamic action if there is any change in the column a alert message pops out.

                            column Name: Score

                            Column Type: Text With Autocomplete

                            Dynamic Action - Event Change in Column

                            JavaScript- alert('Score Entered');

                             

                            https://apex.oracle.com/pls/apex/f?p=83223:5:15914412677608:::::

                             

                             

                             

                            ----------------------

                             

                            I worked around with my issue and got it working but still i would love this to work and check out why it is not working.

                             

                            Thanks

                            Praveen

                            • 11. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                              Jorgelina1

                              I finally understood the issue, I got it working when setting an ID, of course I got a grid error because PK was being duplicated, but when using other fields, it would not work.

                              The only way I got it working was setting up in attributes an "onchange= 'javascript: doSomething( ... ) " but not with the normal change event for a text with autocomplete field...

                              1 person found this helpful
                              • 12. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                                Ashiwn

                                So it is not working with the normal change event for a text with autocomplete which was working in 5.1.4. Is that a bug then? 

                                • 13. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                                  Jorgelina1

                                  I wish I knew for sure. Never used your specific need, but if it was working before, and now it does not, it is most probably a bug.

                                  But I do not know where you can log a bug like that, or if it is even already a "known bug".

                                  Can't help you there, sorry =(

                                  1 person found this helpful
                                  • 14. Re: Oracle Apex 18.2 - Issue with LoV, Text with Autocomplete and DA
                                    Ashiwn

                                    That's fine. Thanks Jorgelina for giving it a try.

                                    1 2 Previous Next