<?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 Populate Multiple fields with document suggestion results in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314018#M1019</link>
    <description>&lt;P&gt;I'm trying to use the document suggestion results to populate multiple UI fields after selection. The only value accessible post-selection is the document id. Is there a way to return a document object after selection, or is there an API call that can be used to pull the document details (metadata) post-selection? I'm also thinking I could do a rest call to pull the document details if there is not a better way of doing so within studio.&lt;/P&gt;
&lt;H3&gt;//HTML segment&lt;/H3&gt;
&lt;P&gt;nuxeo-document-suggestion id="BU" role="widget" value="{{document.properties.AP_Invoice:Route_CD}}" label="BU" min-chars="1"  on-value-changed="_getSuggestionDoc" enrichers="thumbnail" result-formatter="[[thumbnailFormatter]]" &amp;gt;&lt;/P&gt;
&lt;H3&gt;Polymer script seciton:&lt;/H3&gt;
&lt;P&gt;_getSuggestionDoc: function(e) {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;alert(JSON.stringify(e.detail));
//_getThumbnailUrl: function(doc) {

   // retu "/nuxeo/api/v1/id/" + doc.;
  
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 18:34:57 GMT</pubDate>
    <dc:creator>Robert_Smith</dc:creator>
    <dc:date>2020-01-27T18:34:57Z</dc:date>
    <item>
      <title>Populate Multiple fields with document suggestion results</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314018#M1019</link>
      <description>&lt;P&gt;I'm trying to use the document suggestion results to populate multiple UI fields after selection. The only value accessible post-selection is the document id. Is there a way to return a document object after selection, or is there an API call that can be used to pull the document details (metadata) post-selection? I'm also thinking I could do a rest call to pull the document details if there is not a better way of doing so within studio.&lt;/P&gt;
&lt;H3&gt;//HTML segment&lt;/H3&gt;
&lt;P&gt;nuxeo-document-suggestion id="BU" role="widget" value="{{document.properties.AP_Invoice:Route_CD}}" label="BU" min-chars="1"  on-value-changed="_getSuggestionDoc" enrichers="thumbnail" result-formatter="[[thumbnailFormatter]]" &amp;gt;&lt;/P&gt;
&lt;H3&gt;Polymer script seciton:&lt;/H3&gt;
&lt;P&gt;_getSuggestionDoc: function(e) {&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;alert(JSON.stringify(e.detail));
//_getThumbnailUrl: function(doc) {

   // retu "/nuxeo/api/v1/id/" + doc.;
  
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 18:34:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314018#M1019</guid>
      <dc:creator>Robert_Smith</dc:creator>
      <dc:date>2020-01-27T18:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Multiple fields with document suggestion results</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314019#M1020</link>
      <description>&lt;P&gt;You can use a &lt;CODE&gt;&amp;lt;nuxeo-resource id="someId"&amp;gt;&amp;lt;nuxeo-resource/&amp;gt;&lt;/CODE&gt; element to query the document with the document rest API endpoint for documents
&lt;A href="https://doc.nuxeo.com/nxdoc/rest-api-endpoints/"&gt;https://doc.nuxeo.com/nxdoc/rest-api-endpoints/&lt;/A&gt;, simply pass the endpoint url to the &lt;CODE&gt;path&lt;/CODE&gt; property of the element.&lt;/P&gt;
&lt;P&gt;Then you would have to handle the value change at the &lt;CODE&gt;_getSuggestionDoc&lt;/CODE&gt; function, when the id changes you would simply call &lt;CODE&gt;this.$.someId.get().then( //do something)&lt;/CODE&gt;. If you need additional document info you can always add document enrichers.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 19:27:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314019#M1020</guid>
      <dc:creator>a_c</dc:creator>
      <dc:date>2020-01-29T19:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Populate Multiple fields with document suggestion results</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314020#M1021</link>
      <description>&lt;P&gt;Thanks You ac !!!! I think this will work for this and tons of other use cases I'm working on! Much appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 15:02:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/populate-multiple-fields-with-document-suggestion-results/m-p/314020#M1021</guid>
      <dc:creator>Robert_Smith</dc:creator>
      <dc:date>2020-01-30T15:02:33Z</dc:date>
    </item>
  </channel>
</rss>

