cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlexEmprise
Helper II
Helper II

I need help debugging this error on a Patch function

Here is my Patch statement

Patch(
    'POC Submissions', 
    Gallery1.Selected, 
    {
        Title: SegDropClar_1.SelectedText.Value, 
        SubSegment: SubSegDropClar.SelectedText.Value, 
        Category: CatDropClar.SelectedText.Value, 
        BusinessType: Concat(DropDownListSub, "   ~" & BusType & ", " & LOBType & ", " & RType),
        NatureOfTreaty: NatureRadio_1.SelectedText.Value, 
        CancellationType: CancellationRadio_1.SelectedText.Value, 
        Premium: If(IsBlank(FixedPremium_1.Text), PercentPremium_1.Text, FixedPremium_1.Text),  
        CreationDate:Today(), 
        Creator:DataCardValue49.Text, 
        Status: Patch('POC Submissions', Defaults('POC Submissions'), {Status: {Value: "BU Clarification"}})
    }
)

 

And here is the error I am getting 
error.png

 

I have no idea why this isn't working and I've been staring at it for about an hour. Could anyone help me out and point out what I did wrong?

1 ACCEPTED SOLUTION

Accepted Solutions

@AlexEmprise 
I don't think its possible to PATCH inside a PATCH.

Patch(
        'POC Submissions', 
        Gallery1.Selected, 
        {Status:{Value: "BU Clarification"}}
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

3 REPLIES 3
mdevaney
Super User III
Super User III

@AlexEmprise 
You must first isolate which column is giving you the problem.  Remove the columns one-by-one until you find what is causing the issue.  Let me know once you have identified the trouble 🙂

@mdevaney 

Hi,

Not sure why I didn't think of that. It appears to be my last column (Status) I have a similar statement in another form and it works there but it is not working here. I went ahead and isolated the problem causer, any ideas on what to do?

Patch
    (
        'POC Submissions', 
        Gallery1.Selected, 
        {
            Status: 
                Patch
                    (
                        'POC Submissions',
                        Defaults('POC Submissions'),
                        {Status: {Value: "BU Clarification"}}
                     ) 
        }
     )

 

Above is the same code as before but only including the statement that is causing issues.

@AlexEmprise 
I don't think its possible to PATCH inside a PATCH.

Patch(
        'POC Submissions', 
        Gallery1.Selected, 
        {Status:{Value: "BU Clarification"}}
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (99,586)