cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Collections Patch, with If

Hello

I am new to PowerApps and trying to patch using ForAll with a condition using If a value is greater than 0.

Here is part of my formula, I've tried several versions without success. Any help is appreciated.
ForAll(IncomeCollection, If(IncAmt.Value > 0), Patch(IncomeDetails, Defaults(IncomeDetails), {Income_Amount: IncAmt}))

Thanks

Adrian

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: Collections Patch, with If

Hi @adrianlochan ,

 

Change your formula as below:

ForAll(IncomeCollection, (If(IncAmt.Value> 0, Patch(IncomeDetails, Defaults(IncomeDetails), {Income_Amount: IncAmt})))

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

View solution in original post

Highlighted
Frequent Visitor

Re: Collections Patch, with If

Hello @KrishnaV Krishna,

Thanks for the reply, that was helpful.
However along with the If in brackets I found that for me I had to take out the .Value and it worked.

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: Collections Patch, with If

Hi @adrianlochan ,

 

Change your formula as below:

ForAll(IncomeCollection, (If(IncAmt.Value> 0, Patch(IncomeDetails, Defaults(IncomeDetails), {Income_Amount: IncAmt})))

 

I hope this resolved your issue if you see any challenge let me know I am always happy to help.

 

Regards,

Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.

View solution in original post

Highlighted
Frequent Visitor

Re: Collections Patch, with If

Hello @KrishnaV Krishna,

Thanks for the reply, that was helpful.
However along with the If in brackets I found that for me I had to take out the .Value and it worked.

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,387)