cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mdazar
Frequent Visitor

Automate

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.

2 ACCEPTED SOLUTIONS

Accepted Solutions
BCLS776
Super User
Super User

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

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

BCLS776
Super User
Super User

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!

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
BCLS776
Super User
Super User

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

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

//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.

BCLS776
Super User
Super User

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!

_________________________________________________________________________________________
Help the community help more users by choosing to "Accept as Solution" if this post met your needs. If you liked the post and want to show some appreciation, please give it a Thumbs Up.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,965)