Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
mikihiir
Helper III
Helper III

Sync Storage Get

Hei, can't figure out, how to make the call syncronous.
Any idea ?

this
.storage.get(this.updateCountName).then(count => { this.updateCount = +count; }) .catch(() => { this.updateCount = 0; this.storage.set(this.updateCountName, this.updateCount.toString()); }); ...

Thanks in advance
1 ACCEPTED SOLUTION
v-viig
Community Champion
Community Champion

What is this.storage? If it returns a Promise you won't be able to make it synchronous.

You can try using async/await that make code cleaner.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

1 REPLY 1
v-viig
Community Champion
Community Champion

What is this.storage? If it returns a Promise you won't be able to make it synchronous.

You can try using async/await that make code cleaner.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors