Get NodeRef from nodes array.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-26-2014 12:59 AM
Hi Everyone ,
i want to get node ref link from tag so i did as follows
var store = "workspace://SpacesStore";
var tag = "sampletag";
var nodes = search.tagSearch(store, tag);
the above nodes gives me array of tag :
nodes[0] gives me
{http://www.alfresco.org/model/content/1.0}content Node Ref: workspace://SpacesStore/3177d3fa-be03-4683-9c5f-74133d4b07d5
But i want only Node Ref from it (i.e. workspace://SpacesStore/3177d3fa-be03-4683-9c5f-74133d4b07d5 )
I tries using indexOf of javascript it did not work .
Can anyone please help me on how i can get only noderef from array of nodes.???
Thanks and Regards
Aditya C
i want to get node ref link from tag so i did as follows
var store = "workspace://SpacesStore";
var tag = "sampletag";
var nodes = search.tagSearch(store, tag);
the above nodes gives me array of tag :
nodes[0] gives me
{http://www.alfresco.org/model/content/1.0}content Node Ref: workspace://SpacesStore/3177d3fa-be03-4683-9c5f-74133d4b07d5
But i want only Node Ref from it (i.e. workspace://SpacesStore/3177d3fa-be03-4683-9c5f-74133d4b07d5 )
I tries using indexOf of javascript it did not work .
Can anyone please help me on how i can get only noderef from array of nodes.???
Thanks and Regards
Aditya C
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2015 02:24 AM
Hi,
can you try nodes[0].nodeRef
Regards
can you try nodes[0].nodeRef
Regards
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2015 03:36 AM
Hi lementree ,
Thank you for your reply
It works
Also i have used below
var aaaa=nodes[0].url;
which gives me path which i then manipulate and used as per my requirment
So for others who are reading this post below are two ways to get NodeRef from nodes array.
var aaaa=nodes[0].url;
var bbb=nodes[0].nodeRef
both of this gives different OP use and custamize as per your need.
lementree , Thanks again for valuable feedback.
Thanks and Regards
Aditya C Chaudhari
Thank you for your reply
It works
Also i have used below
var aaaa=nodes[0].url;
which gives me path which i then manipulate and used as per my requirment
So for others who are reading this post below are two ways to get NodeRef from nodes array.
var aaaa=nodes[0].url;
var bbb=nodes[0].nodeRef
both of this gives different OP use and custamize as per your need.
lementree , Thanks again for valuable feedback.
Thanks and Regards
Aditya C Chaudhari
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2015 06:10 AM
Hi,
The method search.tagSearch(store, tag) returns array of ScriptNode objects. This object has a lot of useful methods.
You can see all allowed methods and fields by the following url http://docs.alfresco.com/4.1/references/API-JS-ScriptNode.html
The method search.tagSearch(store, tag) returns array of ScriptNode objects. This object has a lot of useful methods.
You can see all allowed methods and fields by the following url http://docs.alfresco.com/4.1/references/API-JS-ScriptNode.html
