<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ReferenceError: search is not defined - Alfresco community 5.2 in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46638#M18544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have created a dashlet to show all active workflows using workflow-instance &amp;amp; task-instance APIs. Its working perfectly. But, now what i need to do is, displaying that current task assignee username for every workflow. In task instance API, it returns only noderef as bpm_assignee.&lt;/P&gt;&lt;P&gt;ex: - bpm_assignee = &lt;SPAN class=""&gt;workspace://SpacesStore/68e35102-a506-46b0-be48-4f8dc1c0e8bb&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I need to get the username to my dashlet using this nodref.&lt;/P&gt;&lt;P&gt;My code is given below.&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt; &amp;lt;meta charset="utf-8"&amp;gt;&lt;BR /&gt; &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1"&amp;gt;&lt;BR /&gt; &amp;lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;BR /&gt; function myFunction() {&lt;BR /&gt; $.ajax({&lt;BR /&gt; type: 'GET',&lt;BR /&gt; url: 'http://127.0.0.1:9090/alfresco/s/api/workflow-instances',&lt;BR /&gt; data: { get_param: 'value' },&lt;BR /&gt; dataType: 'json',&lt;BR /&gt; success: function (data) {&lt;BR /&gt; console.log(data);&lt;BR /&gt; console.log(data.data[0].description);&lt;BR /&gt; for (var i = 0; i &amp;lt; data.data.length; i++) {&lt;BR /&gt; if (data.data[i].isActive == true) {&lt;BR /&gt; $('#records_table').append(&lt;BR /&gt; '&amp;lt;tr&amp;gt;' +&lt;BR /&gt; '&amp;lt;td&amp;gt;' + data.data[i].message + '&amp;lt;/td&amp;gt;' +&lt;BR /&gt; '&amp;lt;td&amp;gt;' + data.data[i].initiator.firstName + ' ' + data.data[i].initiator.lastName + '&amp;lt;/td&amp;gt;' +&lt;BR /&gt; '&amp;lt;td&amp;gt;' + data.data[i].startDate + '&amp;lt;/td&amp;gt;' +&lt;BR /&gt; '&amp;lt;td&amp;gt;&amp;lt;a class="btn btn-info" href="http://127.0.0.1:9090/share/page/workflow-details?workflowId=' + data.data[i].id + '&amp;amp;referrer=workflows&amp;amp;myWorkflowsLinkBack=true" style="text-decoration: none;" target="_blank"&amp;gt;Show Workflows&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;' +&lt;BR /&gt; '&amp;lt;/tr&amp;gt;'&lt;BR /&gt;&lt;BR /&gt; );&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; $.ajax({&lt;BR /&gt; type: 'GET',&lt;BR /&gt; url: 'http://127.0.0.1:9090/alfresco/s/api/workflow-instances/' + data.data[i].id + '?includeTasks=includeTasks?',&lt;BR /&gt; data: { get_param: 'value' },&lt;BR /&gt; dataType: 'json',&lt;BR /&gt; success: function (data) {&lt;BR /&gt; // console.log(data);&lt;BR /&gt; // console.log(data.data.startTaskInstanceId);&lt;BR /&gt; $.ajax({&lt;BR /&gt; type: 'GET',&lt;BR /&gt; url: 'http://127.0.0.1:9090/alfresco/s/api/task-instances/' + data.data.startTaskInstanceId,&lt;BR /&gt; data: { get_param: 'value' },&lt;BR /&gt; dataType: 'json',&lt;BR /&gt; success: function (response) {&lt;BR /&gt; console.log(response.data);&lt;BR /&gt; console.log(response.data.properties.bpm_assignee);&lt;BR /&gt;&lt;BR /&gt; var foundNode = search.findNode(response.data.properties.bpm_assignee);&lt;BR /&gt; console.log("xxxxxxx"+ foundNode);&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;body onload="myFunction()"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;table id="records_table" border="1"&amp;gt;&lt;BR /&gt; &amp;lt;tr style="padding: 5px"&amp;gt;&lt;BR /&gt; &amp;lt;th&amp;gt;Name of the letter&amp;lt;/th&amp;gt;&lt;BR /&gt; &amp;lt;th&amp;gt;Current Asignee&amp;lt;/th&amp;gt;&lt;BR /&gt; &amp;lt;th&amp;gt;Date of receipt&amp;lt;/th&amp;gt;&lt;BR /&gt; &amp;lt;th&amp;gt;View history&amp;lt;/th&amp;gt;&lt;BR /&gt; &amp;lt;/tr&amp;gt;&lt;BR /&gt;&lt;BR /&gt; &amp;lt;/table&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SP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; it gives me following error.&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;ReferenceError: search is not defined&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please help me to find out a solution&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Feb 2019 03:20:47 GMT</pubDate>
    <dc:creator>anuradha1</dc:creator>
    <dc:date>2019-02-02T03:20:47Z</dc:date>
    <item>
      <title>ReferenceError: search is not defined - Alfresco community 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46638#M18544</link>
      <description>Hi,I have created a dashlet to show all active workflows using workflow-instance &amp;amp; task-instance APIs. Its working perfectly. But, now what i need to do is, displaying that current task assignee username for every workflow. In task instance API, it returns only noderef as bpm_assignee.ex: - bpm_</description>
      <pubDate>Sat, 02 Feb 2019 03:20:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46638#M18544</guid>
      <dc:creator>anuradha1</dc:creator>
      <dc:date>2019-02-02T03:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceError: search is not defined - Alfresco community 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46639#M18545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You are performing search operation in share side where search.findNode()&amp;nbsp; is root object of repository not share.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/5.2/references/API-JS-Search.html" title="http://docs.alfresco.com/5.2/references/API-JS-Search.html" rel="nofollow noopener noreferrer"&gt;Search API | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI,My Tasks dashlet is available which is giving same type of rersult.You can take the reference of that dashlet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2019 04:41:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46639#M18545</guid>
      <dc:creator>sp2</dc:creator>
      <dc:date>2019-02-02T04:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceError: search is not defined - Alfresco community 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46640#M18546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply. Is there any other way to do this? I need to show current assignee for workflows in the dashlet. Plz help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2019 07:26:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46640#M18546</guid>
      <dc:creator>anuradha1</dc:creator>
      <dc:date>2019-02-02T07:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceError: search is not defined - Alfresco community 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46641#M18547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any task is assigned to any user, that user will become the owner of that task.&lt;/P&gt;&lt;P&gt;So using owner property you can get the user name of current assignee.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.contcentric.com/" rel="nofollow noopener noreferrer"&gt;Contcentric&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2019 10:48:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46641#M18547</guid>
      <dc:creator>vidhipanchal</dc:creator>
      <dc:date>2019-02-02T10:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: ReferenceError: search is not defined - Alfresco community 5.2</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46642#M18548</link>
      <description>&lt;P&gt;If you are using any script file and getting "Uncaught ReferenceError: x is not defined " which means ‘x’ is either a variable or a method which you are trying to use before declaring it using var keyword. This means that there is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this ‘x’ is &lt;A href="http://net-informations.com/jq/iq/defined.htm" target="_self" rel="nofollow noopener noreferrer"&gt;not defined&lt;/A&gt; error . This usually indicates that your library is not loaded and JavaScript does not recognize the ‘x’.&lt;/P&gt;&lt;P&gt;To solve this error: Load your library at the beginning of all your scripts.&lt;/P&gt;&lt;P&gt;There can be multiple other reasons for this issue:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Conflict with Other Libraries&lt;/LI&gt;&lt;LI&gt;Path to your library included is not correct&lt;/LI&gt;&lt;LI&gt;Llibrary file is corrupted&lt;/LI&gt;&lt;LI&gt;Working offline (when you use CDN)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 28 Oct 2022 07:19:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/referenceerror-search-is-not-defined-alfresco-community-5-2/m-p/46642#M18548</guid>
      <dc:creator>kevinkatler</dc:creator>
      <dc:date>2022-10-28T07:19:41Z</dc:date>
    </item>
  </channel>
</rss>

