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 / New Record Form and Ca...
Power Apps
Answered

New Record Form and Calculated Columns / Patch Function

(1) ShareShare
ReportReport
Posted on by 27

I'm having an issue with calculated fields and submitting data. I get the general idea of using the "Patch" function as suggested to someone in another thread but there's not a lot examples out there of how the "Patch" function works.

 

I have a form "NewRequestForm" that I'm trying to submit data through into a list "Requests Modern". However, there are three calculated fields I have, "Exception", "Completed", and "Current_x0020_Task_x0020_Complet" in the requests modern list.

 

The original "OnSelect" I have for the submit button was "SubmitForm(NewRequestForm)" but it looks like I may need to patch the three columns. I'm having a little trouble with the syntax.

 

The tooltips for the Patch function read as follows "Patch(source,record,update,...)" but that's not much to go on. From another post on this forum it looks like Patch will patch the active form and submit into the SharePoint list, which is slightly odd to me that I don't reference my form? It doesn't appear to want it.

 

From what I read on another post it looks like I should use a Patch function instead of the SubmitForm patch should be "Patch('Requests Modern',Defaults('Requests Modern),...." But then it falls apart for me, mainly because even if I have data cards for the fields they don't appear to take any values. I'd prefer to not have to have datacards for my three calculated columns if possible (but if I must I'll make them invisible), but currently I have them and they don't appear to have an Update attribute. This is all just so confusing. I'd get rid of two of the three calculated columns to fix this situation but the "Current Task Completed" one I really need to be "real time".

 

I doubt that a screencapture would help, but just in case...

 

PowerAppCapture.PNG

 

Any help would be appreciated!

 

Thanks! Michael

Categories:
I have the same question (0)
  • Fields Profile Picture
    312 on at

    Hi @PowerAppMichael,

     

    I was going to say in the other thread, but i followed the thing about "Patch", more the information i got, it helped me solve my problem!

    I don't really know if it helps but take a shot: 

    https://powerapps.microsoft.com/en-us/tutorials/function-patch/

     

    Fields,

     

    (Edit: I know this isn't enough, and i hope that you find the answer that you look for)

  • PowerAppMichael Profile Picture
    27 on at

    Still looking for a solution to this... asking right before the Memorial Day Weekend was probably not a good strategy...

  • Fields Profile Picture
    312 on at

    @PowerAppMichael,

     

    What you can do is, if they don't answer you by the end of the week, or next week, you can do another thread, and put the link on this thread there as a prove that you asked, but nobody ansewered, OR, that you didn't got the answer that you wanted. 
    I gave my best

     

    Fields,

  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @PowerAppMichael (Michael),

     

    Are the calculated field come from SharePoint list?

    If yes, then please first check the known issues for SharePoint connection in PowerApps:

    Connect from Microsoft PowerApps to SharePoint

    For calculated field from SharePoint, it is read-only in PowerApps.

    So it is not supported to use patch or submitform function to patch data to the calculated fields.

     

    For submitform function, if there are fields defined as unique (Which should be marked with * in the form control, in your screenshot, should be: Request Title, Channel, Client, Report Category, Start Date, End Date), then those fields must be provided with a value, othervise, it will throw an error when submitting.

     

    Regards,

    Michael

  • PowerAppMichael Profile Picture
    27 on at

    Thanks for the insight @v-micsh-msft (Michael).

     

    Here's the thing, there are only two actual required fields on the table are "Request Title" and "Channel". While I must have much more data supplied, since I couldn't get it to work I made sure nothing was required and the form not submitting doesn't make sense except for the calculated columns. I assumed the calculated columns would be handled like anything else handles them and you just don't touch them (which from what you're saying sounds like it does)... but I just can't figure out why the form won't submit... and also each time I submit it just says (it's been a while) something like "unknown  error" and returns me to the form with all choices reverted to defaults for the form. I'm having a heck of a time advancing.

     

    If you have any insight how I could get the form to not dump contents, I assume this would be using the UponFailure attribute, that would be good, otherwise I can call this solved as the answer to this is it sounds like I shouldn't be worrying about cacluated columns.

     

    Thanks!

    Michael

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard