Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Dear Experts, I would be grateful for your help.
I am facing an issue with the Patch function, I have a use case in which I have a connected a power app in a power bi report
Where the PowerAPP is being used to take the comments, I am using the patch function to fetch the data from power bi to power apps and then I have added a text input column to get the comments.
It is working fine, but even if there is a second comment on a specific material no, it is creating another row, what I want is, that once a comment is submitted, and if there is any previous comment it should update it with the recent comment.
If there is no comment, then it should save the comment as it is, in the SharePoint list.
I have been trying to do it since many days but i have unable to do it.
PS: i am using a gallery to show the data and to take the comments.
This is the code i am using to patch the data from PowerBI to Powerapps and then to submit the comments in the Sharepoint list.
Patch(SharepointlistName,{Title:"1", Commentcolumn:TextInput2.Text,MaterialColumn:ThisItem.MATERIALColumn, PLANNER_CD:ThisItem.PLANNER,
MAT_DESC:ThisItem.DESC_EN,BUS_LINE:ThisItem.BUS_LINE});Navigate(Screen2,ScreenTransition.None)
@cryptosun - You should be checking to see if your 'key' exists in your SharePoint list before you patch. It would look somthing like:
If(
ThisItem.softwareTermId in colSoftwareTermsUpdates.softwareTermId,
Update(
colSoftwareTermsUpdates,
LookUp(
colSoftwareTermsUpdates,
softwareTermId = ThisItem.softwareTermId
),
{
softwareTermId: ThisItem.softwareTermId,
softwareTermStart: dte_Software_StartDate.SelectedDate,
softwareTermEnd: dte_Software_EndDate.SelectedDate,
softwareTermCost: Value(txt_Software_Cost.Text),
softwareTermSoftwareId: CurrentItem.softwareId
}
),
Collect(
colSoftwareTermsUpdates,
{
softwareTermId: ThisItem.softwareTermId,
softwareTermStart: dte_Software_StartDate.SelectedDate,
softwareTermEnd: dte_Software_EndDate.SelectedDate,
softwareTermCost: Value(txt_Software_Cost.Text),
softwareTermSoftwareId: CurrentItem.softwareId
}
)
)
*I'm using a collection in the OnChange event. Reza Dorrani explains this technique at Power Apps Editable Table/Gallery like Excel (Tutorial) - YouTube
Proud to be a Super User!
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.