cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PabloRoldan
Resolver I
Resolver I

Help How to do a Patch PowerApps and PowerAutomate?

I have an app that has some fields(Columns), and those columns i send them to a power automate flow... currently I'm doing like this

in power apps with
theFlow.Run(JSON({ "name":txt1.Text, "age":txt2.Text ... }))

the payload is like this

{

"name":"Jon",

"age":33,

"country":"MX"

}

but I'm sending all the JSON just for update a few porperties, let's say I only need to send "age" o just "country", and avoid sending all JSON payload, just the properties "that were updated" (SIMULATE like doing a PATCH) How to do that?

 

thanks

1 REPLY 1
StalinPonnusamy
Super User
Super User

Hi @PabloRoldan 

 

We have only one option to know whether the form is UnSaved (IsDirty) not the field level. So the workaround is whenever data is changed collect those data in Collection.

 

Collect changed data on each Control update. For Example, Set the OnChange property of the Name (Text) control to

Collect(col_Items,{Name:TextInput.Text})

The system won't allow converting collection to JSON on the fly. So, convert it and store it in a variable "itemsJSON"

Set(itemsJSON, JSON( col_Items ));
theFlow.Run(itemsJSON);
Clear(col_Items);

 

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,314)