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 Platform Community / Forums / Power Apps / Don't patch(update) if...
Power Apps
Answered

Don't patch(update) if source value is blank

(0) ShareShare
ReportReport
Posted on by 820

Hi

I have an app that finds an item upon user selection and patches the record inside dataverse with entered values.

I have 2 values to patch total and if user doesn't enter anything in the input and values already exists in dataverse - it get's patched with blank. I want to patch only if something is entered. 

So let's say if tectinput1 has value and textinput2 doesant have - patch only Textinput1?

How do i achieve this correctly?

Here is my code:

 

Patch(Components,LookUp(Components,'Komponento pavadinimas'=lblKomponentoPavadinimas.Text),
{
new_dsiules:Value(inpSiules.Text),
new_atauga:Value(inpAtauga.Text)
}
);

Categories:
I have the same question (0)
  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    Hello @jja ,

     

    You could split the "Patch()" for each column depending on your inputs.

     

    If(Not(IsBlank(inpSiules.Text)),
    Patch(Components,LookUp(Components,'Komponento pavadinimas'=lblKomponentoPavadinimas.Text),
    {
     new_dsiules:Value(inpSiules.Text)
    }
    )
    );
    
    If(Not(IsBlank(inpAtauga.Text)),
    Patch(Components,LookUp(Components,'Komponento pavadinimas'=lblKomponentoPavadinimas.Text),
    {
     new_atauga:Value(inpAtauga.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard