cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Level 8

Isse with Patch function

Hi Team -

 

I have a form that I need to patch from.

 

I'm trying to patch a SP List called "RD_Partnership_List" and Patch NULL to two column values - Portfolio_ID & Portfolio_Alias.

Patch(RD_Partnership_List,{ID:DataCardValue90.Text}, {Portfolio_ID:"diditwork" , Portfolio_Alias:Blank()})

 

DataCardValue90.Text represents that node on my CURRENT form that I am Patching in the list RD_Partnership_List. This executes but I don't see any changes.  Can anyone let me know where I may be going wrong?

 

Portfolio_ID & Portfolio_Alias are not choice/drop fields.   Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Isse with Patch function

@simms7400 

So close... you almost had it!

 

Patch(
    RD_Partnership_List,
    LookUp(RD_Partnership_List,ID=Value(DataCardValue90.Text)),
    {Portfolio_ID:"diditwork", Portfolio_Alias:Blank()}
)

 

---
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

5 REPLIES 5
Super User
Super User

Re: Isse with Patch function

@simms7400 

So close... you almost had it!

 

Patch(
    RD_Partnership_List,
    LookUp(RD_Partnership_List,ID=Value(DataCardValue90.Text)),
    {Portfolio_ID:"diditwork", Portfolio_Alias:Blank()}
)

 

---
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

Highlighted
Microsoft v-siky-msft
Microsoft

Re: Isse with Patch function

Hi @simms7400 ,

 

Syntax: Patch( DataSource, BaseRecord, ChangeRecord1 )

The <Base record> is the record you want to patch, so you have to use LookUp function to find out the record your form shows, and ID column is number type, you should use Value function. Please modify your formula as below:

Patch(RD_Partnership_List, LookUp(RD_Partnership_List, ID=Value(DataCardValue90.Text)), {Portfolio_ID:"diditwork" , Portfolio_Alias:Blank()})

 Best regards,

Sik

simms7400
Level 8

Re: Isse with Patch function

@mdevaney 

 

Thank you so much, that worked like a charm!

 

@v-siky-msft   Thank you for your input!

 

I do have one more question. What is the best way to track a ComboBox field changing from populated to empty (user selection on an edit form)? I ask because that its when I need to execute the patch statement when the ComboBox box on one of my edit forms goes from populated to null.

 

Thank you!

simms7400
Level 8

Re: Isse with Patch function

Super User
Super User

Re: Isse with Patch function

You are on the the right track. Definitely use the OnChange property of the ComboBox to do this.

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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