Forum Discussion
powerbi_jenhen
4 years agoResolver II
Wait for Power BI dataset to refresh using the API
Hi, Via Powershell I'm able to invoke the Power BI API to start a dataset refresh using the "refresh dataset in group" API but using a while loop like below on the status value doesn't appear to ...
- 4 years ago
You forgot to set the value of $status inside the loop.
Don't ask for it every five seconds. Every minute is enough.
lbendlin
4 years agoSuper User
You forgot to set the value of $status inside the loop.
Don't ask for it every five seconds. Every minute is enough.
powerbi_jenhen
4 years agoResolver II
You were correct in the end, thanks!
I needed to get the status from the $history.status within the while loop, I was getting this from the status variable outside of the while loop so this was never changing. After setting the while loop condition status to the while loop status the correct status value was returning to exit the while loop...phew!