Hello,
Issue : In Display Form , when i select against Item - Gallery.Selected, i am getting error as below
"Invalid Column, Expected a value compatible with DataSource"
Gallery Data Source - PowerBIInegration datasource
- PowerBIINtegration is nothing but a source of Power BI Report, i have taken sharepoint list as a source
Form Datasource - Directly connected to same SharepointList
Note - I have noticed, i am getting this error when i am passing People column from Power BI report, i got people column after expanding records of People from sharepoint list in Power Query,
As People column from PowerBI report is of Text type however in Sharepoint source, its of Complex Data Type
Please suggest how to deal with this type of data type.
Thanks
Amit
Solved! Go to Solution.
Yes, you were correct "Unfortunately, there are so many unfortunate in Power APP" and i too feel the heat 😞
Anyways, with all your guidance and expertise, finally i am able to crack the solution of the issue
Below is the overview of the solution
1. Browse Gallery - Pointing to PowerBIIntegration Datasource
2. Created one more data source direct to List.
3. In Detail/Edit screen, instead of using Form (Edit/Display), have used Text Boxes and Label and binds text box to Gallery.Selected.<ColumnName> (Coming form powerBIINtegration)
4. Used Patch() and collection to write back data to List
5. And in the end, refresh the Power BI report Dataset with PowerBIIntegration.Refresh() function.
Its works fine, but with one catch, we have to refresh report visual manually everytime as PowerBIIntegration.Refresh() only refreshing the dataset not Visual of Report.
Nonetheless, thanks for all your help and support
Thanks
Amit Srivastavav
Hi @amsrivas
You are trying to mix two different data sources (and I think your title should be "Integrating Power BI with PowerApps"?). Since your Gallery data source is PowerBIIntegration, you must have created the PowerApp from within Power BI. This will not be connected with a Form which has SharePoint as the data source, which is what the error message is saying.
I have never done it before, but I have just tried creating a Collection from the Power BI data using ClearCollect(colCollection, [@PowerBIIntegration].Data, {Units: [@PowerBIIntegration].Data.jgb_units}) and that works. You could then use this Collection to populate the gallery and the form.
You would then use a Patch() statement to submit the data back to SharePoint.
This is not a complete answer but I hope it gives you some ideas for making progress.
Thank for reply.
What i have done, OnSelect of Gallery, i have used below formaula to create collection
Collect(colCollection, [@PowerBIIntegration].Data, {Units: [@PowerBIIntegration].Data.MyField})
And have changed datasource to ColCollection in gallery.
On form, i have used ColCollection as datasource but wondering there is no Field to select, could you please let me know what need to be done so that Fields will be dispalyed for Form
Thanks
Amit
Yes, Collections do not work well with a Form in Edit mode. They do work with Forms in View Mode. Here is a thread which explains some more and offers some ways of dealing with Collections https://powerusers.microsoft.com/t5/Building-Power-Apps/Binding-Collection-to-EditForm-is-not-workin....
Shane Young @Shanescows has done several videos about collections including this one https://www.youtube.com/watch?v=MclJ_O9HvJQ
If you put a Text Input or Drop Down directly on the screen you can bind them to the Collection.
Thanks for prompt reply.
Does that mean, There is no way to Create App with Sharepoint List source via Power BI Report (PowerBIIntegration) with Edit Form where such type of column (DataType) need to be linked with gallery and form (Edit).
Please let me know if there is any workaround with this.
Thanks
Amit Srivastava
Hi Amit
It is possible. Here is a screen of a PowerApp embedded in PowerBI:
The section on the left is a Gallery, on the right is a Form. The Form is DisplayMode.View and this will display the data from a SharePoint list. The card Units is DisplayMode.Edit and you type a new number in, click the Save button and update the SharePoint list. I have used SubmitForm(frmEditUnits) but you could use Patch () instead.
There is an edit pencil which changes the ISIN field ComboBox from View Mode to Edit Mode. The main issue is that you need to start with the Form in DisplayMode.View and change the fields you want to edit to DisplayMode.Edit.
As a final note, the above was done when they first announced embedding PowerApps in PowerBI and I was quite excited. Because of limitations and they are quite fussy to build, I no longer use this at all. We now put the PowerBI and the PowerApp to edit the data in separate tabs in Teams:
This works much better and is easier to build and edit.
Thanks @LooseChippings
Thanks for explanations.
Unfortunately, nothing works for me.
In my SharePoint list, I have one column of Type People, this column having employee .
If I pass this People type column to Power App from Power BI then error appear OnSelect of Form however when I pass normal columns such as normal text etc then App works properly and Edit form is fine with Gallery.selected
Wondering what's going on, any idea?
Thanks
Amit
"Unfortunately, nothing works for me." 😁 Welcome to PowerApps and I am sure everybody on here will agree with you!
'Complex Fields' (People and Lookups) in SharePoint can be tricky. Try this article https://www.about365.nl/2018/11/01/handling-sharepoint-lookup-and-people-fields-in-powerapps/ and there is an excellent Shane Young @Shanescows on the same subject here https://www.youtube.com/watch?v=gsk14D-CYRE.
We moved our data from SharePoint to Common Data Service a few years ago, so I am out of touch with SharePoint. I would stop this thread and start a new one with your specific questions. You are more likely to get an answer from somebody with better and more up to date SharePoint knowledge.
I think you are close to achieving your goal. You just have a couple of little issues to solve. Good luck!
Hi @LooseChippings , Thanks for all your help!!
Just referring the link you provided and seeking for solution, still working on achieve the solution.
Thanks
Amit
Yes, you were correct "Unfortunately, there are so many unfortunate in Power APP" and i too feel the heat 😞
Anyways, with all your guidance and expertise, finally i am able to crack the solution of the issue
Below is the overview of the solution
1. Browse Gallery - Pointing to PowerBIIntegration Datasource
2. Created one more data source direct to List.
3. In Detail/Edit screen, instead of using Form (Edit/Display), have used Text Boxes and Label and binds text box to Gallery.Selected.<ColumnName> (Coming form powerBIINtegration)
4. Used Patch() and collection to write back data to List
5. And in the end, refresh the Power BI report Dataset with PowerBIIntegration.Refresh() function.
Its works fine, but with one catch, we have to refresh report visual manually everytime as PowerBIIntegration.Refresh() only refreshing the dataset not Visual of Report.
Nonetheless, thanks for all your help and support
Thanks
Amit Srivastavav
User | Count |
---|---|
259 | |
108 | |
95 | |
57 | |
40 |