cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shubhk
Helper I
Helper I

Creating a column in dataverse with unique random values out of English dictionary nouns

Hi,

 

I have an interesting problem to solve, my app is a Model-Driven App. Our client wants a column "identifier" which should be unique and should be auto populated with values from english dictionary nouns, user can also override it whenever they wish to.

 

I know Auto-Number and Alternate Keys for uniqueness but this will not fulfill the requirement  of english dictionary nouns. I am thinking of populating a separate table with 500-600 nouns but not sure how to make use of those. Any good implementation approach which will meet uniqueness and usage of english noun for auto-populating would be highly appreciable?

 

Summarizing the requirements of the model-driven app:

1. Auto populated Column with the option of overriding the value

2. Auto-Populated values should be nouns from English Dictionary.

3. Values must be unique always even if overridden

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @Shubhk 

 

For your requirement, We need to write plugin (c#) code that runs in the pre-operation and Pre-Validation stages. 

 

Pre-Operation:  Get the unique noun from another table (source) and update the field to display it. (This operation is to show the data in the UI)

Pre-Validation: This occurs before you save the data to make sure user updated data is unique. If not display the message to change or something.

 

Javascript is possible but it's better in the plugin to handle logging and error handling.


Thanks,
Stalin - Learn To Illuminate

View solution in original post

6 REPLIES 6
AJ_Z
Super User
Super User

I have done something similar before but the way i did it meant the data was populated from the app when the row was created. it was not a calculated column that added this to rows that already existed in the table only to new rows created via the app. Is that what you are looking to do?

If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !

Shubhk
Helper I
Helper I

Hi @AJ_Z 

It should be for new rows only via the model-driven app.

Ah I misread the Post i thought this was for a canvas app, I have done this for a Canvas App in the past. Is it possible for your scenario to embed a canvas app in the model riven app or is that against the wishes of your client.?

If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !

Shubhk
Helper I
Helper I

@AJ_Z : Canvas App for a field? and embedding that app in my model-driven app?

Could you let me understand how you implemented it in detail?

Sorry I think I am causing some confusion. What I am trying to say is the way I implemented it was in a Canvas App not a Model Driven App. Are you able to embed a canvas app into your model driven app for your solution or is that not allowed for this scenario?

 

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embed-canvas-app-in-form

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/embedded-canvas-app-add-classic-d...

 

If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !

StalinPonnusamy
Super User
Super User

Hi @Shubhk 

 

For your requirement, We need to write plugin (c#) code that runs in the pre-operation and Pre-Validation stages. 

 

Pre-Operation:  Get the unique noun from another table (source) and update the field to display it. (This operation is to show the data in the UI)

Pre-Validation: This occurs before you save the data to make sure user updated data is unique. If not display the message to change or something.

 

Javascript is possible but it's better in the plugin to handle logging and error handling.


Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,950)