Page 1 of 3

HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Wed Sep 17, 2014 3:17 am
by Rafael Marques

When I click button at the restaurant, I want to appear only companies from class restaurant.

When I click the button pharmacies, I want to appear only companies category pharmacy.

How to make that happen?

I want to continue using only one gallery in the database.
I'm all companies of all categories in a single gallery, and a string that separates each category.
can help me?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Wed Sep 17, 2014 10:39 am
by Kateryna Grynko

Hi Rafael,

Please check this doc, it may be helpful:
http://devcenter.appery.io/documentat...


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Wed Sep 17, 2014 7:03 pm
by Rafael Marques

can you help me? I read the tutorial, and not get it right.

Parameter that I can use?

Another question:

In my case, I have several categories of buttons.

I'll have to create one page for restaurants, one chemist, one hospital, one for stores?

Or I can create a single page and if I click on Restaurants, load the list of restaurants? if I click the pharmacies, load the list of pharmacies?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Wed Sep 17, 2014 7:16 pm
by Rafael Marques

Eu ja consegui fazer funcionar usando o request "where" e o defaul value

  • {"categoria":"restaurantes"} *

    Ok.

    eu ja sei como fazer o pedido corretamente.

    Mas tenho outro problema, como faço o botão restaurantes, chamar as empresas "restaurantes" ?

    O botão farmácias, mudar para a pagina da lista com a lista farmácias?

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

    Eu tenho uma única página.. ( a pagina para resultados da lista)

    Quero que quando eu clicar no botão restaurantes, mude para a pagina (resultados) e carregue a lista de restaurantes..

    Quando eu clicar no botão de salões de beleza, mude para a pagina (resultados) e carregue a lista de salões de beleza...

    Como faço isso?

    Ja tentei, e não estou conseguindo..
    Pode me ajudar?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Wed Sep 17, 2014 7:27 pm
by Evgene Karachevtsev

Hello Rafael,

Sorry, could you please repeat your last question in English?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Thu Sep 18, 2014 12:09 am
by Yurii Orishchuk

Hi Rafael,

Here is brief plan for it:

1 On button click you need to set some LSV in accordance to the value

2 You can build your "where" request parameter in accordance to LSV from first step.

Here is a code to get LSV:

pre

var yourLsv = localStorage.getItem("yourLSVFromFirstStep");

/pre

Regards.


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Thu Sep 18, 2014 3:43 am
by Rafael Marques

where I put this code?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Thu Sep 18, 2014 3:44 am
by Rafael Marques

HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Thu Sep 18, 2014 3:59 am
by Rafael Marques

I have no idea how to do ... can you help me?


HOW TO SORT A LIST FOR A STRING IN THE DATABASE

Posted: Thu Sep 18, 2014 4:00 am
by Yurii Orishchuk

Rafael,

You need to use this code in code where you have "where" clause.

Then you need to use

"yourLsv" variable to set value for needed filter field.

Regards.