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

Unique Value

Hi

I have a drop down field with two options: Red and Blue. The default option is Blue - this is because the users should only choose red once. However, they can change which row of data has red but red can only be chosen once whereas blue can be chosen hundreds of times. How can this be achieved in PowerApps. If the error message only appears with the on 'Submit' button that's OK

1 ACCEPTED SOLUTION

Accepted Solutions

Hello

thank you for your reply. Unfortunately, I'm quite new to powerapps and what you describe is a little above my knowledge for now. What I've decided to do - as this field will not change very often - is make the first entry the default and the field a read only so that if this needs to be altered, changes will come through me.

thank you

View solution in original post

3 REPLIES 3
Prakash4691
Super User
Super User

@Lilywhite63 ,

Is it in model driven app or canvas app?

If any of the app in both the case on on-change event just disable the field or make as read-only.

Depends on the app I will give you some pointers to achieve the functionality.

 

If it answers your question, kindly give kudo and accept it as solution.

 

 

Regards,

Prakash

rampprakash
Super User
Super User

Hello @Lilywhite63 

 

You need to write JavaScript or plugin to Achieve the same.

 

Steps to Follow For js

1. OnLoad of Page get the Value from the Field and Store it Globally

2. On Save Compare the Value with Updated Value in the Field 

 

and throw the error.

 

Steps to Follow : Plugins

 

1. Use Pre Image to get the Value 

2. Compare with New Value and Throw the error.

 

 

Let me know if you need more clarity.

 

 

Please mark as Answer if it is helpful and provide Kudos


Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
Blog : https://microsoftcrmtechie.blogspot.com

Hello

thank you for your reply. Unfortunately, I'm quite new to powerapps and what you describe is a little above my knowledge for now. What I've decided to do - as this field will not change very often - is make the first entry the default and the field a read only so that if this needs to be altered, changes will come through me.

thank you

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (3,423)