
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)
}
);
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)
}
)
);