Skip to main content

Posts

Showing posts from October, 2018

PowerBI Enterprise App Embed Solution in PHP

I had a nightmare time trying to figure out a simple example for JavaScript API, for PowerBI embed solution using PHP programming language. I hope developers post every single step solutions when possible as it's very nightmarish to figure out that which we don't know. I hope following notes could be useful to some, and if I myself have forgotten to include any steps or the steps are no longer valid due to upgrades or software changes, please post it in comments and I will try to update the steps if possible or create a new blog and add a link to it in this blog post. Power BI Azure Portal URL: https://portal.azure.com Setting up an Embed App Embed Onboarding URL: https://app.powerbi.com/embedsetup/appownsdata Sign In “your-org-email-org-office-365-email” Register your application Application Name: Power BI Integration API access Read only APIs (check items below) Read all datasets Read all dashboards Read all re

JavaScript - new Promise resolve-reject, dbPromise, and callbacks

No fun learning es6 version of the javascript updates. There is so much going on with "new Promise" or indexedDb version "dbPromise" that it's hard to grasp all the process happening around it. Especially the callbacks and/or returns with there own returns and callbacks. It took me a while but now I feel like, I know enough to understand "es6" "promise" and "then" after completing the course. The best way to understand how the "resolve and reject" work with "promise" is to work on a sample project or lab. I was struggling with resolve and no reject, as it was confusing. Could not understand initially as to how the resolve will be returned but a reject will not trigger the failed scenario. Finally realized the sub method was not implemented with the reject logic and thus didn't return the error part of the callback. It may be easier to understand now regarding promise with return and no returns, db