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
Suggested Answer

Erreur inattendu

(0) ShareShare
ReportReport
Posted on by
Bonjour,
 
J'ai un message d'erreur inattendu:
Patch(Articles; SelectedArticle; {Quantite: SelectedArticle.Quantite + Value(txtQuantiteMouvement.Text)});
     Patch(Articles; Defaults(Articles); {
         Article: SelectedArticle;
         TypeMouvement: {Value: "Entrée"};
         Quantite: Value(txtQuantiteMouvement.Text);
         DateMouvement: Now()
     });
     Set(SelectedArticle; LookUp(Articles; ID = SelectedArticle.ID));
     Notify("Stock mis à jour"; NotificationType.Success)
 
Il souligne le ; dans la 1ère ligne et ça me créer une erreur.
et me renvoie: caractère inattendus. 
Capture d’écran 2...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    Mohsin Ali Profile Picture
    225 on at
    Hello @AB-20070203-0 - As par Microsoft documentation below:
     
    For France/Spain, where comma is used for decimal separator, the operator chaining should be used as double semicolon (;;) rather single semicolon (;). So based on this justification your expression will become. 
    Patch(
        Articles;
        SelectedArticle;
        {
            Quantite: SelectedArticle.Quantite + Value(txtQuantiteMouvement.Text)
        }
    );;
    
    Patch(
        Articles;
        Defaults(Articles);
        {
            Article: SelectedArticle;
            TypeMouvement: {Value: "Entrée"};
            Quantite: Value(txtQuantiteMouvement.Text);
            DateMouvement: Now()
        }
    );;
    
    Set(
        SelectedArticle;
        LookUp(Articles; ID = SelectedArticle.ID)
    );;
    
    Notify(
        "Stock mis à jour";
        NotificationType.Success
    )
     
    Please give it a shot and let me know the outcome. 
     
     
    If it works for you, please mark this answer as verified, as this way you're helping the community members to quickly navigate to the resolution.
  • WarrenBelz Profile Picture
    156,386 Most Valuable Professional on at
    Firslty @Mohsin Ali is correct regarding the European function separator syntax (;;).
     
    There are a couple of other things - one query and one suggested improvement.
    Firstly I do not believe you need the blue highlighted line - you are creating a new record and if there is a field called Article in your (I assume SharePoint) List, you are patching a complete record to it (not a single field value). 
     
    Also, you can update the Record Variable SelectedArticle directly by it setting to output of the updating Patch as below.
     
    Set(
       SelectedArticle;
       Patch(
          Articles; 
          {
             ID: SelectedArticle.ID;
             Quantite: SelectedArticle.Quantite + Value(txtQuantiteMouvement.Text)
          }
       )
    );;
    Patch(
       Articles; 
       Defaults(Articles); 
       {
          Article: SelectedArticle;
          TypeMouvement: {Value: "Entrée"};
          Quantite: Value(txtQuantiteMouvement.Text);
          DateMouvement: Now()
       }
    );;
    Notify(
       "Stock mis à jour"; 
       NotificationType.Success
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  

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 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard