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

PL-400

(0) ShareShare
ReportReport
Posted on by 3
Good day i am studying PL-400 and the first lab asked me to paste this in OnStart of an application but it keeps on giving me an error. 
Code: 
ClearCollect(colCustomer,
{CustomerNumber: 7470, InvoiceNumber: "INV70817"},
{CustomerNumber: 4259, InvoiceNumber: "INV29595"},
{CustomerNumber: 8251, InvoiceNumber: "INV74302"},
{CustomerNumber: 2338, InvoiceNumber: "INV35115"},
{CustomerNumber: 1524, InvoiceNumber: "INV82337"},
{CustomerNumber: 1530, InvoiceNumber: "INV82338"}
);
Set(varUserDisplayName, User().FullName)
 
error: 
 
Please help.
Thanks
Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,833 Super User 2026 Season 1 on at
     
    I tried pasting the same formula in Power Apps Studio and didn't have any issues, which makes me think this is related to the language settings in your browser. Depeninding on those, syntax for Power FX are different: Global support in Microsoft Power Fx - Power Platform | Microsoft Learn
     
    Please try replacing all commas with semicolons and all single semicolons to double semicolons:
     
    ClearCollect(colCustomer;
    {CustomerNumber: 7470; InvoiceNumber: "INV70817"};
    {CustomerNumber: 4259; InvoiceNumber: "INV29595"};
    {CustomerNumber: 8251; InvoiceNumber: "INV74302"};
    {CustomerNumber: 2338; InvoiceNumber: "INV35115"};
    {CustomerNumber: 1524; InvoiceNumber: "INV82337"};
    {CustomerNumber: 1530; InvoiceNumber: "INV82338"}
    );;
    Set(varUserDisplayName; User().FullName)
     
     
     
    If this reply helped you in any way, please give it a Like 💜 and in case it resolved your issue, please mark it as the Verified Answer ✅.
     
     
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    Your code is correct for regions like India and the UK. The error you're encountering is most likely due to the regional settings of your environment.

    In Power Apps, the syntax can vary depending on the region. For example, some regions use a comma (,) as a decimal separator, while others use a period (.). Because of this, the argument separator in formulas also changes—some regions use a comma (,), while others use a semicolon (;).

    I’m not sure which region your environment is set to, but if you're seeing this error, it’s likely due to this difference. To resolve the issue, try replacing commas (,) with semicolons (;) as the argument separator in your formula. This is something I've learned when preparing for PL-400 exam a year ago.

    According to your region code onStart will look like this:
    ClearCollect(
        colCustomer;
        {CustomerNumber: 7470; InvoiceNumber: "INV70817"};
        {CustomerNumber: 4259; InvoiceNumber: "INV29595"};
        {CustomerNumber: 8251; InvoiceNumber: "INV74302"};
        {CustomerNumber: 2338; InvoiceNumber: "INV35115"};
        {CustomerNumber: 1524; InvoiceNumber: "INV82337"};
        {CustomerNumber: 1530; InvoiceNumber: "INV82338"}
    );
    Set(varUserDisplayName; User().FullName);
     

    If you want to test it just add a gallery and in item property pass the colCustomer and from tree view click on app > three dots (ellipses) > click on  "Run on Start" > data will be shown in gallery.
     
    I hope that works for you!
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    two bracket and trailing character are missing 
     
    ClearCollect(
        colCustomer,
        [
            {CustomerNumber: 7470, InvoiceNumber: "INV70817"},
            {CustomerNumber: 4259, InvoiceNumber: "INV29595"},
            {CustomerNumber: 8251, InvoiceNumber: "INV74302"},
            {CustomerNumber: 2338, InvoiceNumber: "INV35115"},
            {CustomerNumber: 1524, InvoiceNumber: "INV82337"},
            {CustomerNumber: 1530, InvoiceNumber: "INV82338"}
        ]
    );
    
    Set(varUserDisplayName, User().FullName)

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard