AnsweredAssumed Answered

How to retrieve the possible values of a property from a WebScript?

Question asked by amoro on Feb 16, 2017
Latest reply on Feb 17, 2017 by afaust

Hello everyone!


I would need your help please.

I have a functional WebScript that shows me all the files of a site with their properties as well as the value of these properties.

 
Example if I have a file test.pdf in my site, my WebScript will display well:

{Http://www.alfresco.org/model/system/1.0}name test.pdf
{Http://www.alfresco.org/model/system/1.0}modifier 2016-02-08
{Http://www.alfresco.org/model/system/1.0}creator me
....
...
....

I also have properties from a custom template that was created in the company, for example:

{Http://www.mycompany.com/model/content/1.0}MaPropPerso value1

But this custom property, when we created the model, we defined several possible values. It can have the value1 (in our example, the custom property of the file test.pdf is set to value1 but could have been set to value2), value2, value3, value4, etc .......

My question is what is the line of javascript or freemarker code to write in my WebScript to return all possible values of {http://www.mycompany.com/model/content/1.0}MyPropPerso?


I know there is a way to list the values of a property that contains several properties but I do not know which one.

Thank you, cordially.

Outcomes