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 / Seperate to functions ...
Power Apps
Answered

Seperate to functions with comma or semicolon

(0) ShareShare
ReportReport
Posted on by 22
Hello everyone.

i´ve the following code at a button - OnSelect 

The problem is that neither semicolons nor commas work to separate the functions.
 
Patch(
    UserHierarchy;
    galUsers.Selected;
    {
        ManagerID: {
            Id: cmbMgr.Selected.ID;
            Value: cmbMgr.Selected.FullName
        }
    }
);
Refresh(UserHierarchy);
ResetForm(Form1);
EditForm(Form1)
 

If I use the semicolon, I get the following error message for the semicolon between the patch and refresh function:
Unexpected characters. Characters are not used as expected in the formula.






 
Patch(
  UserHierarchy,
  galUsers.Selected,
  {
    ManagerID: {
      Id: cmbMgr.Selected.ID,
      Value: cmbMgr.Selected.FullName
    }
  }
);
Refresh(UserHierarchy);
ResetForm(Form1);
EditForm(Form1)
 
If I use the comma as a separator for the functions, 
I get the following error message:
Unexpected characters. The formula contains ‘Error’, but ‘ParenClose’ is expected.
Unexpected characters. Characters are not used as expected in the formula.

 
For your information.
The problem is not unique to this code.
Whenever I have two functions in a code and I have to separate them, I get the error
 

I have set German as the language in the app. But even if I set the language to English, the errors still occur.
I just can't find a solution

Thanks for help

Marcus
Categories:
I have the same question (0)
  • Verified answer
    StretchFredrik Profile Picture
    3,395 Super User 2025 Season 2 on at
    See if the code below works. 
    Patch(
        UserHierarchy;
        galUsers.Selected;
        {
            ManagerID: {
                Id: cmbMgr.Selected.ID;
                Value: cmbMgr.Selected.FullName
            }
        }
    );;
    Refresh(UserHierarchy);;
    ResetForm(Form1);;
    EditForm(Form1)
    If my response solved your issue, please mark it as ✅ Accepted Answer and give it a like.
     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard