Wait for response from the web component

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

1 Like

Thanks , sorry for the error , I hope the google translator translation is efficient as I do not speak english

1 Like

In order to get help post a screenshot of your procedure

1 Like

move the blocks after getting data from API.

i.e when web got text block, until enable the notifier spinning progress visible

image

1 Like

This post was flagged by the community and is temporarily hidden.


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 !

1 Like

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.

Good morning , thank God everything is great and you? is that I just got a project to develop on Kodular, before I was just studying Kodular,

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

Web Component is asynchronous.