Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load web page untill data is sent to CDS

Hi All, I am triggering a flow on click of a button from a web page. Now, I want to load the web page or hide all the web-page content till all the data is sent to CDS via flow. How can I achieve that? Is there any variable returned by the flow after completion of data insertion which I can use in the portal for the above purpose?

Super User
Super User

Hi @Anonymous , 


You can add a variable in the flow and enable few settings to make this happen. 


here are the high level steps: 


1.  In the flow initialize your variable and capture the success and failure 


2. Click on the three little dots on the condition and click "configure run after" on success condition 



3. Select  the checkbox "is successful" 



4.  similary on the failed condition. Ensure to select " has failed or has timedout" like below 



5. Now this will allow you to capture the flow status and wait for the flow until it is complete. 

6. In the Portal you can add a container covered with white box and some nice status. Once the flow is complete using JS/ CSS hide the container and show the content. 


This is a high level but I hope you got the idea of how to achieve this by enabling the key settings in flow.  Hope this helps. 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Not applicable

Hi @ragavanrajan ,

Thank you for the reply,

I have one doubt in your suggested approach. How can read that particular variable on the portal?

I followed this blog to trigger a flow.

Hi @Anonymous,


As the flow you are building is triggering by Http request you can also use Http response action in your flow to send data back where you can handle it in javascript.

If you find this post helpful consider marking it as a solution to help others find it.
Not applicable

Hi @OOlashyn ,

Thank you for the reply

Can you please end me the link of post or blog which I can refer? 

Yes, you can check this blog post about using http trigger and sending http response in Power Automate. 

If you find this post helpful consider marking it as a solution to help others find it.
Not applicable

Hi @OOlashyn ,

I have followed the link but how can I read that response output in the portal?

You can read it as regular response as part of the xmlhttprequest (that I assume you are using as it was used in the flow article that you shared in the beginning). Just google how to read response in xmlhttprequest for more example (like here or in official docs here or example code below).

//build http request string using URL from Power Automate flow
var req = new XMLHttpRequest();
var url = "https://<<copy HTTP POST URL from Power Automate here>>";
//register function to run on change of request stage  
req .onreadystatechange = function() {
    //if done
    if (req .readyState === 4) {
      //do something with response
      console.log(req .response);

//send https request to Power Automate"POST", url, true);
req.setRequestHeader('Content-Type', 'application/json');
If you find this post helpful consider marking it as a solution to help others find it.

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (3,065)