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

Patch with IF

(0) ShareShare
ReportReport
Posted on by

Hi, 

 

I have a patch formula where it works well, But I want to do a modification with IF. 

 

I have a field name Cash. If the Cash field is blank/empty I do not want to patch. otherwise that means if the cash field has a value do the patch. How can I do that, following is the patch formula, 

 

Patch(
'Cash Received',
Defaults('Cash Received'),
{
Date: DataCardValue180_2.SelectedDate,
'Customer Name': DataCardValue181_2.Selected,
Amount: Value(DataCardValue182_2.Text),
InvoiceNumber: DataCardValue179_2.Text
}
)

 

Cash field is DataCardValue182_2

 

Thank you in advance, 

Osmand

Categories:
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Try

    If(!IsBlank(DataCardValue182_2),

    Patch(
    'Cash Received',
    Defaults('Cash Received'),
    {
    Date: DataCardValue180_2.SelectedDate,
    'Customer Name': DataCardValue181_2.Selected,
    Amount: Value(DataCardValue182_2.Text),
    InvoiceNumber: DataCardValue179_2.Text}))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • OsmandFernando Profile Picture
    on at

    @eka24  Thank you so much. It worked. 

     

    Osmand

  • eka24 Profile Picture
    20,925 on at

    Please accept as a solution

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard