Hi all,
I've got a Power BI report and added a Power Apps canvas app with a connected Power Automate Flow to it to save data back to the data source, and they are working together quite nicely.
But now I've got the following requirement:
I managed to solve that requirement by calling the Flow in the OnSelect of a "single-select" drop down control. It was not "perfect", as the drop down's OnSelect event called the Flow, and I had to show a loading spinner as soon as the user clicked to open the drop down, but it was "acceptable".
But how do I solve that with a multi-select control, like a combo box or a gallery with check boxes? I cannot use the OnSelect event of those controls, as a user should be able to select multiple entries. So for each click it would call the Flow and show a loading spinner.
I thought about adding a "reload" button/icon next to the gallery, but I would consider that "bad design" as I as a user would expect the gallery/combo box items to update automatically when I select the entries in the Power BI report. And my end users also didn't accept that. 😉
Any ideas? Is there maybe a way to solve that with a custom component (PCF)?
I would really love to have an OnChange event on the PowerBIIntegration control 😎
There's no direct way to do it. Here's a nifty work around. Create a combo box(you can set the visible property to false if you don't want it messing up your app design). Set it's items property to PowerBIIntegration.Data, and it's default selected property to [first(power integration.data)."any field of your choice.."]. Now on the onchange of the combo box use the functionality you want to change!
Here's a blog explaining the above with diagrams.
I have a powerapp visual integrated in PowerBI report.
when you select a item from report, the powerapp opens a new form or edit form checking if the row is present in SP list.
Now i have requirement to show Load and Cancel button in place of new form.
clicking on Load - i call power automate and load some values from backend and show Edit form
Clicking on Cancel - I should show NewForm.
So In My Powerapp screen i have these things
SharepointNewForm with btnSubmit
SharePointEditForm with btnUpdate
btnLoad Button
btnCancel Button
On screen visible property
I am setting a context varible UpdateContext({formNew:false})
SharepointNewForm Visible property is formNew
SharepointNewForm Visible = formNew
SharePointEditForm Visible =CountRows([@PowerBIIntegration].Data) = 1 && !IsBlankOrError(LookUp(SPList, ProjID=Text(First([@PowerBIIntegration].Data).ide)))
btnLoad visible = CountRows([@PowerBIIntegration].Data) = 1 && IsBlankOrError(LookUp(SPList, ProjID=Text(First([@PowerBIIntegration].Data).ide))) && !formNew
btnCancel visible = CountRows([@PowerBIIntegration].Data) = 1 && IsBlankOrError(LookUp(SPList, ProjID=Text(First([@PowerBIIntegration].Data).ide))) && !formNew
On Click on Cancel I do UpdateContext({formNew:true}) , Doing this hides my Load and Cancel button and shows user the SharepointNewForm
And then the problem comes here, If user selects a different row in PowerBI report , I again have to show user Load and Cancel button and hide SharepointNewForm
But this is not happening as i have set the UpdateContext({formNew:true}) onselect of Cancel button and I do not have a way to reset to false when there is onchange in [@PowerBIIntegration].Data
So I need to be able to set the formNew variable to False everytime the user is changing a selection in PowerBiReport.
But I should also be able to set formNew variable to true when user clicks Cancel
I used custom component with input property binded to PowerBIIntegration].Data
And output property i set a variable like shown below
if I use custom output property for SharePointNewForm Visible = customProperty1.cusSetVisibilty, I can to set the formNew variable to False everytime the user is changing a selection in PowerBiReport. But I cannot set this to true on click of Cancel button and back to False if user changes selection in PowerBi
Thanks ToHe, I appreciate the prompt response.
I am still struggling to make this work.
The end goal I have is to be able to action the formula Reset(combo_box) where combo_box is a Combo Box on the screen, with the effect of a change in the Power BI data resulting in a change in the value of the Combo Box, even if the user has previously edited the Combo Box.
"Bind" in this case means assigning PowerBIIntegration.Data to the Input property as you did.
Regarding your second issue, I can only assume from your description. You need to create an output property in your component and assign it the value of your random_number variable inside of the component. And then assign the output property of your component instance to your textbox on the screen.
Would you mind explaining what you mean by "Bind" in this circumstance? I have attempted the following with no luck:
I know this is a bit old post, but I thought I'd share what I was able to do. It may be a bug in PowerApps, as I stumbled over this by accident, but a combo box OnChange() event is triggered by a change in PowerBIIntegration.Data change. I added a hidden one that set a few variables when it was changed and it's all working well now.
I found a workaround/solution by creating a component. 😊
Steps:
Doing it that way makes it a bit "chatty" as basically every selection change in the Power BI report will trigger a Flow (and thus a Stored Proedure) call, but I didn't find any other solution yet.
WarrenBelz
146,653
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional