workflow script with query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-11-2014 10:47 AM
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
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
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2014 01:17 PM
query: '@scp\:NameOfTheCustomProperty:' + ContentOfVariableNamedXXX ; //for term query
query: '@scp\:NameOfTheCustomProperty:"' + ContentOfVariableNamedXXX + '"'; //for phrase query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2014 04:56 AM
Thank you so much, kaynezhang.
It works fine.
It works fine.