web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Automate

(0) ShareShare
ReportReport
Posted on by 9

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.

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    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

  • mdazar Profile Picture
    9 on at

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

  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard