1

Order by descending

When selecting records you can't specify descending?

38 replies

null
    • Alain_Fontaine
    • 2 yrs ago
    • Reported - view
    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    Sean could you tell me what is wrong with the http function?
    With an example I can test?

    • Sean
    • 2 yrs ago
    • Reported - view

    Alain,

    Yes, that's the one I was thinking of  :). It looks like finding results by searching for compiler or interpreter wouldn't have mattered. 

    • Sean
    • 2 yrs ago
    • Reported - view

    Jacques, 

    You can no longer use the http() function to access a general web address from the Mac app.

     

    Examples: ninox.com or google.com

     

    You can access google.com from the browser version, but if you try to access ninox.com from the browser you'll get stuck in a loop that's difficult to get out of.

    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    I don't use the http function much (in Ninox). Can you give me an example of code so that I can do a test?

    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    I don't use the http function much (in Ninox). Can you give me an example of code so that I can do a test?

    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    Thank you Alain for the link. Your examples are clear and well explained.

    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    If I put this code in a button, it works fine (from a browser, I don't have the desktop application):

    var response := http("GET", "https://www.google.com/search?q=test");
    Error := response.error;
    Text := response.result

    note: Error and Text are text fields.

     

    You can try putting this code in a formula. It will show a button and when you click on it, it will launch the same request, but from the JavaScript without going through Ninox:

    html("

    <button type='button' onclick='loadDoc()'>Request data</button>

    <p id='demo'></p>

    <script>
    function loadDoc() {

       var xhttp = new XMLHttpRequest();
       xhttp.onreadystatechange = function () {
          if (this.readyState == 4 && this.status == 200) {
             document.getElementById('demo').innerHTML = this.responseText;
          }
       };
       xhttp.open('GET', 'https://www.google.com/search?q=test', true, null, null);
       xhttp.send();
    }
    </script>

    ");

    • Ninox developper
    • Jacques_TUR
    • 2 yrs ago
    • Reported - view

    note : To work fine, you must check line "Disable Cross-Orgin Restriction" on menu "Devlop" of Safari

    • Sean
    • 2 yrs ago
    • Reported - view

    Jacques,

    Thank you for your time and effort. I had looked into using fetch() a while back, but I determined that using JavaScript in the html() function was a one-way tunnel as far as the Mac app is concerned. Meaning, when you go that route, you can't send any information back to the Mac app so that you can add information to the database. As far as I know, the only way to get that information into Ninox is through the API and into a cloud database which I might try some time in the future. I imagine there would be quite a performance hit compared to how it worked in the Mac app. I was able to scrape 1000 threads in about 25 minutes using the Mac app and some threads, like this one, had more than one page in it.

     

    For what it's worth, I do this for my own enjoyment and in my spare time. When it gets to the point where I don't enjoy it or I get tired of beating my head against a wall that shows no sign of giving way, I move on to something else more fruitful.

    • yinapps.com
    • drew
    • 2 yrs ago
    • Reported - view

    All this simply to find a way to use one of the most standard of data functions: Order by DESC?  This is rather mind-blowing that the ninox devs left this out.  How does this stand up to the no-code mentality of the product?

      • yinapps.com
      • drew
      • 2 yrs ago
      • Reported - view

      drew.. although i know we can sort within the fields UI, while we are manually entering select statements, this just seems so *logical* given internally, ninox must execute a data-based call for the records.

      • SvenSteffen_Arndt
      • 2 yrs ago
      • Reported - view

      drew..  you don't need to do "Order by Desc" - the idea is to select the data with the select function. Then put the data in a view field and configure the view field so that you order by any data field in the way you like.

Content aside

  • 1 Likes
  • 2 yrs agoLast active
  • 38Replies
  • 3905Views
  • 4 Following