Powerapps Use Multiple Functions (Patch) in OnSuccess Syntax

I have a problem with my PowerApps application.
I get an error on line 16. The error is placed on the semicolon.
I have already tried a comma, an @ and whitespace but nothing works.
Can anyone help me?

Here is the code:

Patch(
    workshop;
    Defaults(workshop);
    {
        Titel: DataCardValue1.Text;
        room: DataCardValue2.Text;
        description: DataCardValue3.Text;
        start: Text(HourInputStart.Value) & Text(MinuteInputStart.Value);
        end: Text(HourInputEnd.Value) & Text(MinuteInputEnd.Value);          
        language: DropdownLanguage.Selected.Value;    
        capacity: CapacityInput.Value;
        employeeId: Text(User().EntraObjectId);
        swisscomLocationsId: (1);      
        teamsMeeting: DataCardValue11.Text  
    }
);
 
 
ForAll(
    Sequence(CapacityInput.Value);
    Patch(
        workshop_booked;
        Defaults(workhop_booked);
        {
            Titel: "Irrelevant";
            WorkshopID: "12";
            WorkshopCreator: Text(User().EntraObjectId);
            ChildName: "";
            ChildNumber: "";
        }
    )
)

Best Regards
Patrick :smiley:

New contributor

user23469609 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

From the sample code you provided, there are couple of issues to be addressed.

  1. With the syntax used for separating arguments in your functions.
    PowerApps uses semicolons (;) in some contexts and commas (,) in others, depending on the locale settings. You should use commas (,) instead of semicolons between the arguments of the Patch and ForAll functions.

  2. In PowerApps, “Start” and “End” are reserved words, and using them as field names can cause syntax errors. this can be fixed by adding “[@]”

  3. Also If the above fix doesn’t work, check your PowerApps environment’s for the right locale settings. The separator might differ based on your regional settings.

I also noticed that you have some typos which might not be an issue. but you should update your references and make sure they are correctly spelled, e.g., workshop_booked instead of workhop_booked.

find the updated code below :

Patch(
    workshop,
    Defaults(workshop),
    {
        Titel: DataCardValue1.Text;
        room: DataCardValue2.Text;
        description: DataCardValue3.Text;
        start: Text(HourInputStart.Value) & Text(MinuteInputStart.Value);
        end: Text(HourInputEnd.Value) & Text(MinuteInputEnd.Value);          
        language: DropdownLanguage.Selected.Value;    
        capacity: CapacityInput.Value;
        employeeId: Text(User().EntraObjectId);
        swisscomLocationsId: 1;      
        teamsMeeting: DataCardValue11.Text  
    }
);

ForAll(
    Sequence(CapacityInput.Value),
    Patch(
        workshop_booked,
        Defaults(workshop_booked),
        {
            Titel: "Irrelevant";
            WorkshopID: "12";
            WorkshopCreator: Text(User().EntraObjectId);
            ChildName: "";
            ChildNumber: "";
        }
    )
);

Since you are using ; to separate the arguments of the call to the ForAll and Patch function, I’m assuming you are in a locale which uses , as the decimal separator for numbers. In that case, if you want to have multiple functions, you should use ;; as the chaining operator:

Patch(
  workshop;
  Defaults(workshop);
  { ... }
);;

ForAll(
  Sequence(CapacityInput.Value);
  Patch(...)
)

Take a look at https://learn.microsoft.com/power-apps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator for more details.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật