Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

The function Patch has some invalid arguments

(0) ShareShare
ReportReport
Posted on by 3,502

I have 4 fields inside my Canvas App to create and populate a collection named Colrow, as follow:-

 

johnjohn123_0-1648743570459.png

 

 

Now inside the Screen OnVisible i created this empty collection:-

 

ClearCollect(Colrow,{
Article:Blank(),
Description:Blank(),
Returnable:Blank(),
Qty:Blank()


});

 

and inside the button OnSelect i set this formula to populate the collection :-

 

Patch(Colrow,Defaults(Colrow),{
Article:Article.Text,
Qty:Qty.Text,
Description:Description.Text,
Returnable:Returnable.Text
});

but the last formula is raising this error:-

The function Patch has some invalid arguments

 

as follow:-

johnjohn123_1-1648743670091.png

 

 

any advice please?

Thanks

 

  • Re: The function Patch has some invalid arguments

    Hi @johnjohn123 ,

     

    Maybe you could try to use the following formula:

    Screen OnVisible:

    ClearCollect(Colrow,{Article:"",Description:"",Returnable:"",Qty:""});

     

    Best Regards,

    Charlie Choi

     

  • johnjohn123 Profile Picture
    johnjohn123 3,502 on at
    Re: The function Patch has some invalid arguments

    @vish3027  but why Patch with defaults should be able to add items to the collection, am i wrong?

  • vish3027 Profile Picture
    vish3027 434 on at
    Re: The function Patch has some invalid arguments

    @johnjohn123 , You can try Collect function instead of Patch.

     

    Collect(Colrow,{
    Article:Article.Text,
    Qty:Qty.Text,
    Description:Description.Text,
    Returnable:Returnable.Text
    });

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard