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 / Creating a new record
Power Apps
Unanswered

Creating a new record

(0) ShareShare
ReportReport
Posted on by 256

Hi guys,

what's wrong with this formula?

If(lista_dipendenti.Selected.reparto_anagrafica.Text <> anagrafica_reparto.Text; Patch('Dpi gestione consegne';Defaults('Dpi gestione consegne');{Titolo:"consegna_dpi";Reparto:anagrafica_reparto.Text;cambio_reparto:Now()}));;

I think there is something wrong with the Patch function: It doesn't create a new record when the values are differents.

 

Categories:
  • timl Profile Picture
    37,314 Super User 2026 Season 2 on at

    Hi @Utente_365_1fl 

    To diagnose this, I'd add a label and set the text property to the formula below. Can you confirm that this shows true when the values are different?

    (lista_dipendenti.Selected.reparto_anagrafica.Text <> anagrafica_reparto.Text)

     

  • Utente_365_1fl Profile Picture
    256 on at

    I ussually do too.

    in the label I wrote: If(lista_dipendenti.Selected.reparto_anagrafica.Text <> anagrafica_reparto.Text; "reparto changed"; "reparto same")

    I'll show you: as I open the form page and I do not change anything the the label gives me "reparto same", if I change I get "reparto changed"

    cambio reparto1.jpg

    Than, If I change something i get "reparto changed": it means that the check works. That's why I think there is something wrong in the Patch()

    cambio reparto2.jpg

  • joyle Profile Picture
    Microsoft Employee on at

    The Patch expression should be working fine. I run the same expression from my end with your locale and I can confirm new records are getting added to the table.

    Now, one thing that I experienced though was a delay for some controls to get refreshed. For instance, a label with the following expression.

    Last(DVTable).Name // this was not refreshing in a good time fashion

     

    Gallery sorted by 'Created on" descendent worked fine.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 312

#3
Mohsin Ali Profile Picture

Mohsin Ali 252

Last 30 days Overall leaderboard