Bom dia a todos , estou com um problema pois preciso aguardar o retorno de dados de uma consulta a API Json através do componente WEB , mais antes da resposta chegar o app já executa o restante do código e assim sem os dados em memoria não consigo recuperar os dados do componente WEB para processa-los.
Translation added by Mod
Good morning everyone , I have a problem because I need to wait for the return of data from a Json API query through the WEB component , but before the answer arrives the app already runs the rest of the code and so without the data in memory I can not recover the WEB component data to process them.
Welcome to community. Official language is English. Since this is your first post I added the translation for you but next time please follow community’s rules
Thanks to everyone on the forum for your help , but I noticed my logic error , I just put the procedure inside the WEB component answer and not inside the login procedure , thanks again for your attention , the topic can be closed !
I’m saving in Global Response, but before the result of the query arrives, the rest of the code is executed while the variable is still without data, (ps: I think I’ve found my error
kkkkkkk), I need to check if the variable is empty or not before continuing the code.
No I’m wrong, I’m already checking the variable, but the case is that if I test the variable and it is empty it won’t log in, only when you click on login again it will respond because it will already have the data in memory.
First if statement always gives you 200 only, because 200 means you are getting result from web. So design your blocks into the second if statement.
Second if says success is true if false
If true mean , login is success so you are redirecting the user to open another screen.
If false mean, user is not logged in , if I am correct based in your block so add the condition the remaining condition what should be followed in this false