cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MShelnutt
Helper IV
Helper IV

Code Error

@RandyHayes 

 

Hi Randy,

I had to modify my On Select property so it will update one of my SharePoint columns in the record, but I am not writing it correctly, can you take a look?-

 

MShelnutt_1-1617221259249.png

 

 

-Michael Shelnutt

1 ACCEPTED SOLUTION

Accepted Solutions
v-albai-msft
Community Support
Community Support

Hi @MShelnutt ,

Have you already set the variable varFormData to one of the records in list ‘Customer Complaints 21’ ?

I would suggest you check below things:

1. You cannot use the control name directly. You should use the output of this control. For example, if this is a Text-input control, you should use formula like:

DataCardValue19_1.Text =XXX

If this is a dropdown control, you should use formula like:

DataCardValue19_1.Selected.Value

2. Seems you want to update the Choice column ‘Form Status’ based on the value of DataCardValue19_1? If yes, try below formula(assume your DataCardValue19_1 is a dropdown control):

If(DataCardValue19_1.Selected.Value="Ask for Manager Exception- no return",
Patch('Customer Complaints 21',
varFormData,
{'Form Status':{Value:"Pending Approval"}}
 ),
Patch('Customer Complaints 21',
varFormData,
{'Form Status':{Value:"Submitted"}}
)
)

Best regards,

Allen

View solution in original post

2 REPLIES 2
v-albai-msft
Community Support
Community Support

Hi @MShelnutt ,

Have you already set the variable varFormData to one of the records in list ‘Customer Complaints 21’ ?

I would suggest you check below things:

1. You cannot use the control name directly. You should use the output of this control. For example, if this is a Text-input control, you should use formula like:

DataCardValue19_1.Text =XXX

If this is a dropdown control, you should use formula like:

DataCardValue19_1.Selected.Value

2. Seems you want to update the Choice column ‘Form Status’ based on the value of DataCardValue19_1? If yes, try below formula(assume your DataCardValue19_1 is a dropdown control):

If(DataCardValue19_1.Selected.Value="Ask for Manager Exception- no return",
Patch('Customer Complaints 21',
varFormData,
{'Form Status':{Value:"Pending Approval"}}
 ),
Patch('Customer Complaints 21',
varFormData,
{'Form Status':{Value:"Submitted"}}
)
)

Best regards,

Allen

View solution in original post

@v-albai-msft 

I plugged it it and there are no red squiggles, so looks good!

 

I really appreciate the help.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (978)