cancel
Showing results for 
Search instead for 
Did you mean: 

custom constraint to populate selection list from Oracle- How To?

mrmike
Champ in-the-making
Champ in-the-making
I've found a few links throughout the web, suggestions from 2008 on how to do this, etc… but upon implementing them, they don't seem to be working- Has Alfresco changed the way that they implement property drop down lists in Alfresco/Share now? I have fields that I'd like to populate the dropdown options from a reference table in my Oracle database. I'd also like to change advanced search to have the same functionality. Does anyone have some sample code/ suggestions?

Thanks,
Mike
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
This is the way to implement it.
https://forums.alfresco.com/forum/developer-discussions/repository-services/custom-constraint-032620...

And it is working for Alfresco share also. Which version of alfresco you are using?

mrmike
Champ in-the-making
Champ in-the-making
I'm embarrassed to say… i had "select select" in the start of my query… the error I was getting was that LIST can't be null… I guess it was due to the query failing- Is there somewhere in logs or logging I can turn on that might help me catch that?

The changes didn't go through to the advanced search functionality…. What should I be looking to modify to add the constraint to the advanced search field? Would that be a modification to share-config-custom.xml? Does anyone have a sample of what that would look like?

Thank you all!

mrmike
Champ in-the-making
Champ in-the-making
I was able to get the dropdown working in advanced search by changing the control template to selectone.ftl. I really appreciate the response and assistance!

p.s. My dropdown wasn't working because I had "select select" in my query… What logging should I turn on that I'd catch something like that?

Thanks again!