AnsweredAssumed Answered

workflow script with query

Question asked by archiee on Sep 11, 2014
Latest reply on Sep 16, 2014 by archiee
hello everyone.

I'm an Alfresco newby and I'm working on community 4.2e.

I'm currently working on an Activity workflow in which I have to perform queries on custom properties I added on user profile.
I performed user customization following this Jeff Potts tutorial (god bless you): http://ecmarchitect.com/archives/2012/02/27/1555

Now, my problem.

Currently I'm performing this kind of search:

<javascript>
var def =
{
query: "@scp:NameOfTheCustomProperty:TextToSearch",
language: "fts-alfresco"
};
var nodes = search.query(def);
</javascript>

which works fine.

What I don't know how to do is the way I can substitute my "TextToSearch" with the content of a previously set variable.

Something like replacing:
<javascript>
query: "@scp:NameOfTheCustomProperty:TextToSearch",
</javascript>
with:
<javascript>
query: "@scp:NameOfTheCustomProperty:ContentOfVariableNamedXXX",
</javascript>
Thank you in advance for your help.

Best regards,

Archie

Outcomes