From my digging around, it seems the set of formats of columns of type Text, e.g. Email, Phone, URL etc. is baked into Dataverse. I would like to be able to create custom formats, for example using a format mask, but this seems impossible - it all seems to go back to this class , which is simply a pseudo enum, which I assume triggers some hard-coded logic.
This is rather a pain, and seems to fly in the face of dataverse's professed openness and flexibility. For the small library catalog I am developing, I already need two custom formats - ISBNs and RGBA colors.
Is there a way to do this? Am I missing something? Or is there a way we can have this in Power Apps?
Solved! Go to Solution.
Hi @rampart,
The link that @timl is the method to do it out-of-the-box with Dataverse model-driven apps. But this is only front-end and will not be enforced from the server-side (API or database), same thing with JavaScript. It is possible to enforce it server-side but you'll have to revert to coding with plugins: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/plug-ins
You can write a plugin that executes real-time (sync) on create or update of a record and validates the input. If it's not correct, the plugin should throw an InvalidPluginExecutionException with a message explaining to the user the input format is invalid.
Hope this helps...
There is a featur request for this here: https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Text-Formats-for-Data-Entry/idi-p/172003.
If you agree, please upvote this.
Hi @rampart
What type of app are you building? If it's a model driven app, you can use the input mask control. There are some more details my post here.
Hi @rampart
Is this for a Model-driven app? There might be a way to do it using JavaScript. What are you trying to do specifically?
Thanks all. I'm using a model-driven app. I'll check out @timl's post. I would really prefer to have my mask enforced in dataverse, though...
Hi @rampart,
The link that @timl is the method to do it out-of-the-box with Dataverse model-driven apps. But this is only front-end and will not be enforced from the server-side (API or database), same thing with JavaScript. It is possible to enforce it server-side but you'll have to revert to coding with plugins: https://docs.microsoft.com/en-us/powerapps/developer/data-platform/plug-ins
You can write a plugin that executes real-time (sync) on create or update of a record and validates the input. If it's not correct, the plugin should throw an InvalidPluginExecutionException with a message explaining to the user the input format is invalid.
Hope this helps...
User | Count |
---|---|
38 | |
19 | |
14 | |
4 | |
3 |
User | Count |
---|---|
37 | |
29 | |
25 | |
8 | |
7 |