Hello Alfrescians,
I was able to make a custom Data List and I have an issue regarding duplicates, is there a way to make a specific field in my custom made Data List to be unique?
Please refer to the attached file.
Best Regards,
June
The only way I can think of would be to write a behavior that binds to your custom data list type, looks at your property value, searches to see if another instance of a data list item exists with that property value, then throws an exception if it does.
Or you could handle it with a custom form control or some other client-side JavaScript that would invoke an AJAX call to a web script that would do the same search and then throw a form validation error or something depending on the result of the AJAX call.
Hello Sir,
Thanks for sharing the idea, these presented ideas are new to me Sir, and can I ask another favor? can you share some documents/links on how to do these? All I need is an introduction/overview and an example in implementing this. Thank you so much.
Best Regards,
June
You can take a look at my tutorial on Behaviors: Implementing Custom Behaviors in Alfresco | ECMArchitect | Alfresco Developer Tutorials
The project contentreich-alfresco-datalists/contentreich-extdl-repo at master · deas/contentreich-alfresco-datal... offers that option to generate an unique ID for datalist items.
Take a look at the source code and you will find all you need to implement the behaviour.
The only thing missing will be the check for repeated values.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.