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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Copying data to ShareP...
Power Apps
Answered

Copying data to SharePoint List

(0) ShareShare
ReportReport
Posted on by 14

Hello everybody

 

I have this code, which works very well, but I would also like to copy the same data to another SharePoint list by adding the timestamp. How can this be achieved? 

 

    If(Value(DataCardValue34.Text)<Value(DataCardValue31.Text);

            Office365Outlook.SendEmailV2("xx.xx@xxxx.com";

                                "Commande consommable labo à réaliser";

                                Concatenate("Article : "&DataCardValue26.Text & "<br>";

                                "Référence : "&DataCardValue27.Text & "<br>";

                                "Fournisseur : "&DataCardValue9.Text & "<br>";

                                "Stock : " & (Value(DataCardValue34.Text) - Value(QuantitéSortie.Text) + Value(QuantitéEntrée.Text))));;

            Navigate(BeginScreen1; ScreenTransition.None);

        Navigate(BeginScreen1; ScreenTransition.None))

Thank you for your ideas and solutions

 

M@x

Categories:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,715 Super User 2025 Season 2 on at

    Hi @Muzomax59 

     

    Assuming that the Sharepoint list has the same columns I would have done something like this.

    Adding the patch under the SendMail function:

     Patch(
     SharePointList, // Replace with your SharePointlist
     Defaults(SharePointList), 
     {
     Article: DataCardValue26.Text,
     Référence: DataCardValue27.Text,
     Fournisseur: DataCardValue9.Text,
     Stock: (Value(DataCardValue34.Text) - Value(QuantitéSortie.Text) + Value(QuantitéEntrée.Text)),
     Submission_Time: Now() // Add the current timestamp
     }
     );

     You can create a new column of type Date & Time (let’s call it "Submission_Time") in your sharepoint list.

     

    Your code would look like:

    If(
     Value(DataCardValue34.Text) < Value(DataCardValue31.Text),
     Office365Outlook.SendEmailV2(
     "xx.xx@xxxx.com",
     "Commande consommable labo à réaliser",
     Concatenate(
     "Article: " & DataCardValue26.Text & "<br>",
     "Référence: " & DataCardValue27.Text & "<br>",
     "Fournisseur: " & DataCardValue9.Text & "<br>",
     "Stock: " & (Value(DataCardValue34.Text) - Value(QuantitéSortie.Text) + Value(QuantitéEntrée.Text))
     )
     );
     Patch(
     SharePointList,
     Defaults(SharePointList),
     {
     Article: DataCardValue26.Text,
     Référence: DataCardValue27.Text,
     Fournisseur: DataCardValue9.Text,
     Stock: (Value(DataCardValue34.Text) - Value(QuantitéSortie.Text) + Value(QuantitéEntrée.Text)),
     Submission_Time: Now() 
     }
     );
     Navigate(BeginScreen1; ScreenTransition.None);
     Navigate(BeginScreen1; ScreenTransition.None)
    )
    

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Muzomax59 Profile Picture
    14 on at

    Ok it's good

     

    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 361

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard