I have 3 sharepoint list as connection in powerapps. These list have monthly data for several project Id's. We use to copy data from last to this month for every project id's and alter them if needed in powerapps. Is there any way that, these monthly data can be copied automatically on every month. So that user no need to copy every time.
Solved! Go to Solution.
You can use a Power Automate flow on a recurrence trigger to make changes to a SharePoint list at defined time intervals.
Hope that helps,
Bryan
I had a quick look through your code, and you may want to create a series of Power Automate flows, each triggered by the Power Apps V2 connector. That connector allows you to trigger the flow from within the app and pass parameters the flow needs to operate correctly. Turning this code into a set of flows is well beyond the scope of a single community post, and I suggest you do some searches on the related Power Automate Community for examples that do much of the same thing.
For a head start, Power Automate has function blocks that work very similar to some of the Power Apps functions:
ForAll() is equivalent to a "Apply to Each"
LookUp() is equivalent to a "Get Item" when using a SharePoint ID
Patch() is equivalent to a SharePoint "Create Item" or "Update Item", depending on your need
That should get you started - good luck!
You can use a Power Automate flow on a recurrence trigger to make changes to a SharePoint list at defined time intervals.
Hope that helps,
Bryan
//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.
I had a quick look through your code, and you may want to create a series of Power Automate flows, each triggered by the Power Apps V2 connector. That connector allows you to trigger the flow from within the app and pass parameters the flow needs to operate correctly. Turning this code into a set of flows is well beyond the scope of a single community post, and I suggest you do some searches on the related Power Automate Community for examples that do much of the same thing.
For a head start, Power Automate has function blocks that work very similar to some of the Power Apps functions:
ForAll() is equivalent to a "Apply to Each"
LookUp() is equivalent to a "Get Item" when using a SharePoint ID
Patch() is equivalent to a SharePoint "Create Item" or "Update Item", depending on your need
That should get you started - good luck!
User | Count |
---|---|
125 | |
87 | |
84 | |
75 | |
69 |
User | Count |
---|---|
214 | |
178 | |
140 | |
105 | |
83 |