Hello,
I'm trying to update data in my custom API using PATCH. I am unable to update a field to null. I have date, string and number fields that a nullable. Is there a built in power apps function that I can call the will put null in my API Patch data for fields that i want changed to blank.
Thanks
-Ken
As an example in a save button
I want to be able to call my custom API like the following for a date:
WOSAPI.WOSV4PatchByWONUM("111", {COMPLETEDATE: If(Text(DatePicker3.SelectedDate, DateTimeFormat.UTC) = "", NULLFUNCTION, Text(DatePicker3.SelectedDate, DateTimeFormat.UTC))})
This NULLFUNCTION would put null in my patch body
We currently don't have a function for that.
I have added it as an Idea to Ideas board
https://powerusers.microsoft.com/t5/PowerApps-Ideas/Function-to-produce-blank-value/idi-p/14353#M964
Please upvote on this so the team can prioritize this.
For now, I can think of a workaround using our current language syntax: unspecificed value in a If condition is treated as NULL.
If you could change your expression to the following, it will work:
WOSAPI.WOSV4PatchByWONUM("111", {COMPLETEDATE: If(Text(DatePicker3.SelectedDate, DateTimeFormat.UTC) <> "", Text(DatePicker3.SelectedDate, DateTimeFormat.UTC))})
meaning if the value is empty string, no value i.e. NULL is specified.
Hope this helps
Murali
Looks like the work around you send me does not send null to my api. It only seems to ignore the field update.
@kklauder, I think you're right. And as murali suggested, please submit one request in the Ideas forum.
Hi all, is there any update on this? When will we be able to set fields in data sources to null?Thanks for the hard work.
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 836 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
MS.Ragavendar 231 Super User 2025 Season 2