Hi,
I am trying to develop a PowerApp to embed in Power BI. In the Power BI it is display a user's data. In the PowerApp I want to have a form to allow users to submit changes they would like to make about their data via creating an item in a SharePoint list and passing the value selected in the Power BI as a value in a field of the SharePoint list.
Is there a way to convert the value from the PowerBI Integration from table to text? Below is an example of what I am trying to accomplish:
If(Form1.Mode = New,(Patch('Submissions', {ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name)); SubmitForm(Form1); Navigate(Screen3)
Thanks!
Solved! Go to Solution.
Hi @skwan ,
Firstly, please note that the right syntax of Patch function shoule be:
Patch(tablename,Defaults(tablename),{.....}) //create a new record
Patch(tablename,one item,{....}) //edit an existing record
Secondly,the formula that you use:
{ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name
This can not represent a record. A record shoule be like this: {field1:....,field2:.....,field3:....}
I suggest you try this:
If(Form1.Mode = New,
ClearCollect(test,AddColumns(Form1.Updates,"ID", Blank(),"Name",First([@PowerBIIntegration].Data).Name))
); //create a collection with the data of Form1,ID and Name, use First(table).fieldname could result a value
Collect('Submissions',test); //user this collection to update
Navigate(Screen3)
Here's a doc about Patch, I think maybe you need to know more about it :
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch
Best regards,
Hi @skwan
[@PowerBIIntegration].Data always returns a collection
First([@PowerBIIntegration].Data).Name - will give you the first value from Power BI connection
If user selects 1 item in Power BI then First([@PowerBIIntegration].Data) will give you that item
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @skwan ,
Firstly, please note that the right syntax of Patch function shoule be:
Patch(tablename,Defaults(tablename),{.....}) //create a new record
Patch(tablename,one item,{....}) //edit an existing record
Secondly,the formula that you use:
{ID: Blank()}, Form1.Updates, { Name: [@PowerBIIntegration].Data.Name
This can not represent a record. A record shoule be like this: {field1:....,field2:.....,field3:....}
I suggest you try this:
If(Form1.Mode = New,
ClearCollect(test,AddColumns(Form1.Updates,"ID", Blank(),"Name",First([@PowerBIIntegration].Data).Name))
); //create a collection with the data of Form1,ID and Name, use First(table).fieldname could result a value
Collect('Submissions',test); //user this collection to update
Navigate(Screen3)
Here's a doc about Patch, I think maybe you need to know more about it :
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch
Best regards,
Hi,
when I try to connect a data table from Dataverse which has a column (multi-select dropdown) and try to display the column in PowerBI, I can see that it's fetching only the IDs (eg. 11690001,11690002) and not the string values. I even tried using DirectQuery. Please suggest a way to resolve this.
User | Count |
---|---|
256 | |
111 | |
95 | |
48 | |
40 |