//FPO Copy
ForAll(
FPOTFilter,
Patch(
'FPO Table',
Defaults('FPO Table'),
{
Title: Text(
DateAdd(
DateTimeValue(Dropdown2.SelectedText.Value),
1,
Months
),
"[$-en-US]mmmm yyyy"
),
FPO: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: FPOTFilter[@FPO].Value
},
FPODetails: FPOTFilter[@FPODetails],
CurrentStatus: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: FPOTFilter[@CurrentStatus].Value
},
FPOProjectTableID: Gallery1.Selected.ID
}
)
);
//Finance Data
ForAll(
FTFilter,
Patch(
'Finance Table',
Defaults('Finance Table'),
{
FProjectTableID: Gallery1.Selected.ID,
MonthYear: Text(
DateAdd(
DateTimeValue(Dropdown2.SelectedText.Value),
1,
Months
),
"[$-en-US]mmmm yyyy"
),
'Finance Group': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: FTFilter[@'Finance Group'].Value
},
'Estimated Amount': FTFilter[@'Estimated Amount'],
'Actual Spent': FTFilter[@'Actual Spent'],
'12Month': FTFilter[@'12Month'],
'2021': FTFilter[@'2021']
}
)
);
Clear(FTFilter);
//Risk Data
ForAll(
RTFilter,
Patch(
'Risk Table',
Defaults('Risk Table'),
{
RProjectTableID: Gallery1.Selected.ID,
MonthYear: Text(
DateAdd(
DateTimeValue(Dropdown2.SelectedText.Value),
1,
Months
),
"[$-en-US]mmmm yyyy"
),
Title: RTFilter[@Title],
'Risk Level': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: RTFilter[@'Risk Level'].Value
},
'Mitigation/Action': RTFilter[@'Mitigation/Action'],
'Level After': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: RTFilter[@'Level After'].Value
}
}
)
);
//Milestone Data
ForAll(
MTFilter,
Patch(
'Milestone Table',
Defaults('Milestone Table'),
{
MProjectTableID: Gallery1.Selected.ID,
MonthYear: Text(
DateAdd(
DateTimeValue(Dropdown2.SelectedText.Value),
1,
Months
),
"[$-en-US]mmmm yyyy"
),
MilestoneList: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: MTFilter[@MilestoneList].Value
},
Start: MTFilter[@Start],
'Target Finish': MTFilter[@'Target Finish'],
Status: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: MTFilter[@Status].Value
},
Owner: MTFilter[@Owner]
}
)
);
Patch(
'Project Table',
LookUp(
'Project Table',
ID = Gallery1.Selected.ID
),
{'Date Updated': Now()}
);
Patch(
'Project Status Table',
Defaults('Project Status Table'),
{
'Month Year': Text(
DateAdd(
DateTimeValue(Dropdown2.SelectedText.Value),
1,
Months
),
"[$-en-US]mmmm yyyy"
),
Phases: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: Trim(
Last(
Split(
Label7_3.Text,
":"
)
).Result
)
},
'Outlook Status': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: LookUp(
'Project Status Table',
ProjectTableID = Gallery1.Selected.ID And 'Month Year' = Dropdown2.SelectedText.Value
).'Outlook Status'.Value
},
'Financials Status': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: LookUp(
'Project Status Table',
ProjectTableID = Gallery1.Selected.ID And 'Month Year' = Dropdown2.SelectedText.Value
).'Financials Status'.Value
},
'Schedule Status': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: LookUp(
'Project Status Table',
ProjectTableID = Gallery1.Selected.ID And 'Month Year' = Dropdown2.SelectedText.Value
).'Schedule Status'.Value
},
'Resources Status': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: LookUp(
'Project Status Table',
ProjectTableID = Gallery1.Selected.ID And 'Month Year' = Dropdown2.SelectedText.Value
).'Resources Status'.Value
},
'Next 30 Days Plan': Label14_1.Text,
'Current Status / Changes since Last Review': Label14_3.Text,
'Support Needed': Label14.Text,
'Project Description': Label14_2.Text,
'4SquareRed': Label14_4.Text,
'Date Updated': Now(),
ProjectTableID: Gallery1.Selected.ID
}
);
We use this code on onselect property of button to copy data everytime.
How to create a flow for this.
I'm new to powerplatform, please guide me.