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

How to customize an error message

I have a list with a field where unique values are enforced. When I try to add a duplicate entry via PowerApps, I get this message: 

The requested operation is invalid. Server Response: The list item could not be added or updated because duplicate values were found in the following field(s) in the list: [User]. clientRequestId: ... serviceRequestId: ...

which I expect. Is there any way to customize the text of this message? Or would I be better off removing the unique value enforce on the SP side and do it all through PowerApps?

I am working with a User field

1 ACCEPTED SOLUTION

Accepted Solutions
emh
Level 8

Re: How to customize an error message

Hello Cooper,

 

UserID is the column name of the SharePoint list UserID

User_Input_UserID is DataCardValue#.Text

 

Does that help clarify?

View solution in original post

3 REPLIES 3
emh
Level 8

Re: How to customize an error message

Hello Cooper,

 

One way to customize the message is to do a LookUp before the record is added:

 

If(IsBlank(Lookup(YourSharePointList), UserID=User_Input_UserID), add record, display custom error message)

 

Hope this helps.

 

<< If this solves your issue, please flag this as such so others may also benefit. >>

cooper33
Level 8

Re: How to customize an error message

Thanks for the response. Can you provide any more detail around this part?

 

UserID=User_Input_UserID

 

What do these represent in the context of the SharePoint list and the DataCard/DataCardValue?

emh
Level 8

Re: How to customize an error message

Hello Cooper,

 

UserID is the column name of the SharePoint list UserID

User_Input_UserID is DataCardValue#.Text

 

Does that help clarify?

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,094)