<?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 Access ArcGIS Enterprise Portal items using OAuthentication and open the item (Web App) with click on Thumbnail in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1060897#M73257</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm using the following example (&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/&lt;/A&gt;) to get the access to the items in our ArcGIS Enterrpise portal.&lt;/P&gt;&lt;P&gt;I have adapted the example so that all items (Web Mapping Application, Dashboards, ...) are displayed by a group in which I have only changed the "query" property, i.e. added the group id. (query: "group: 59bd561ffc0c50e5b390ef9e78352de6")&lt;/P&gt;&lt;P&gt;The access to the ArcGIS Enterprise portal works great and the thumbnails of the web mapping application are displayed in the gallery.&lt;/P&gt;&lt;P&gt;The question:&lt;BR /&gt;How can the web mapping applications and dashboards be opened in the new browser window when the user clicks on the thumbnail?&lt;/P&gt;&lt;P&gt;I am very grateful for any help!&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" /&amp;gt;
    &amp;lt;title&amp;gt;Identity Manager &amp;lt;/title&amp;gt;

    &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css" /&amp;gt;

    &amp;lt;script src="https://js.arcgis.com/4.19/"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body {
        font-size: 14px;
        width: 100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
      }

      .esri-item-gallery .esri-item-container {
        float: left;
        text-align: center;
        padding: 10px;
        width: 204px;
        display: inline-block;
      }

      .esri-item-gallery .esri-image {
        width: 200px;
        height: 133px;
        border: 2px solid gray;
        border-radius: 5px;
      }

      .esri-item-gallery .esri-null-image {
        line-height: 133px;
        text-align: center;
        color: #999999;
      }

      .esri-item-gallery .esri-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .esri-item-gallery .esri-null-title {
        color: #999999;
      }

      .action {
        color: blue;
        cursor: pointer;
        text-decoration: underline;
      }
    &amp;lt;/style&amp;gt;
    &amp;lt;script&amp;gt;
      require([
        "esri/portal/Portal",
        "esri/identity/OAuthInfo",
        "esri/identity/IdentityManager",
        "esri/portal/PortalQueryParams"
      ], (Portal, OAuthInfo, esriId, PortalQueryParams) =&amp;gt; {
	  
        const personalPanelElement = document.getElementById("personalizedPanel");
        const anonPanelElement = document.getElementById("anonymousPanel");
        const userIdElement = document.getElementById("userId");
		


        const info = new OAuthInfo({
          // Swap this ID out with registered application ID
          appId: "YC0EFtVxMfyh9j8r",
          // Uncomment the next line and update if using your own portal
          // portalUrl: "https://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/arcgis"
		  portalUrl: "https://myportal.com/arcportal",
          // Uncomment the next line to prevent the user's signed in state from being shared with other apps on the same domain with the same authNamespace value.
          // authNamespace: "portal_oauth_inline",
          popup: false
        });
        esriId.registerOAuthInfos([info]);

        esriId
          .checkSignInStatus(info.portalUrl + "/sharing")
          .then(() =&amp;gt; {
            displayItems();
          })
          .catch(() =&amp;gt; {
            // Anonymous view
            anonPanelElement.style.display = "block";
            personalPanelElement.style.display = "none";
          });

        document.getElementById("sign-in").addEventListener("click", () =&amp;gt; {
          // user will be redirected to OAuth Sign In page
          esriId.getCredential(info.portalUrl + "/sharing");
        });

        document.getElementById("sign-out").addEventListener("click", () =&amp;gt; {
          esriId.destroyCredentials();
          window.location.reload();
        });

        function displayItems() {
          const portal = new Portal("https://myportal.com/arcportal");
          // Setting authMode to immediate signs the user in once loaded
          portal.authMode = "immediate";
          // Once loaded, user is signed in
          portal.load().then(() =&amp;gt; {
            // Create query parameters for the portal search
            const queryParams = new PortalQueryParams({
              query: "group: 59bd562ffc0c40e5b390ef9e58352de6",
              sortField: "numViews",
              sortOrder: "desc",
              num: 20
            });

            userIdElement.innerHTML = portal.user.username;
            anonPanelElement.style.display = "none";
            personalPanelElement.style.display = "block";

            // Query the items based on the queryParams created from portal above
            portal.queryItems(queryParams).then(createGallery);
          });
        }
		
		
        function createGallery(items) {
          let htmlFragment = "";

          items.results.forEach((item) =&amp;gt; {
            htmlFragment +=
              '&amp;lt;div class="esri-item-container"&amp;gt;' +
              (item.thumbnailUrl
                ? '&amp;lt;div class="esri-image" style="background-image:url(' + item.thumbnailUrl + ');"&amp;gt;&amp;lt;/div&amp;gt;'
                : '&amp;lt;div class="esri-image esri-null-image"&amp;gt;Thumbnail not available&amp;lt;/div&amp;gt;') +
              (item.title
                ? '&amp;lt;div class="esri-title"&amp;gt;' + (item.title || "") + "&amp;lt;/div&amp;gt;"
                : '&amp;lt;div class="esri-title esri-null-title"&amp;gt;Title not available&amp;lt;/div&amp;gt;') +
              "&amp;lt;/div&amp;gt;";
          });
			document.getElementById("itemGallery").innerHTML = htmlFragment;
		};
		
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="anonymousPanel" style="display: none; padding: 5px; text-align: center;"&amp;gt;
      &amp;lt;span id="sign-in" class="action"&amp;gt;Sign In&amp;lt;/span&amp;gt; and view your ArcGIS Online items.
    &amp;lt;/div&amp;gt;

    &amp;lt;div id="personalizedPanel" style="display: none; padding: 5px; text-align: center;"&amp;gt;
      Welcome &amp;lt;span id="userId" style="font-weight: bold;"&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp;-&amp;amp;nbsp;
      &amp;lt;span id="sign-out" class="action"&amp;gt;Sign Out&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div id="itemGallery" class="esri-item-gallery" style="width: 100%;"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nb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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 May 2021 10:58:29 GMT</pubDate>
    <dc:creator>Den-GIS</dc:creator>
    <dc:date>2021-05-24T10:58:29Z</dc:date>
    <item>
      <title>Access ArcGIS Enterprise Portal items using OAuthentication and open the item (Web App) with click on Thumbnail</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1060897#M73257</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm using the following example (&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/sample-code/identity-oauth-basic/&lt;/A&gt;) to get the access to the items in our ArcGIS Enterrpise portal.&lt;/P&gt;&lt;P&gt;I have adapted the example so that all items (Web Mapping Application, Dashboards, ...) are displayed by a group in which I have only changed the "query" property, i.e. added the group id. (query: "group: 59bd561ffc0c50e5b390ef9e78352de6")&lt;/P&gt;&lt;P&gt;The access to the ArcGIS Enterprise portal works great and the thumbnails of the web mapping application are displayed in the gallery.&lt;/P&gt;&lt;P&gt;The question:&lt;BR /&gt;How can the web mapping applications and dashboards be opened in the new browser window when the user clicks on the thumbnail?&lt;/P&gt;&lt;P&gt;I am very grateful for any help!&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" /&amp;gt;
    &amp;lt;title&amp;gt;Identity Manager &amp;lt;/title&amp;gt;

    &amp;lt;link rel="stylesheet" href="https://js.arcgis.com/4.19/esri/themes/light/main.css" /&amp;gt;

    &amp;lt;script src="https://js.arcgis.com/4.19/"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body {
        font-size: 14px;
        width: 100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
      }

      .esri-item-gallery .esri-item-container {
        float: left;
        text-align: center;
        padding: 10px;
        width: 204px;
        display: inline-block;
      }

      .esri-item-gallery .esri-image {
        width: 200px;
        height: 133px;
        border: 2px solid gray;
        border-radius: 5px;
      }

      .esri-item-gallery .esri-null-image {
        line-height: 133px;
        text-align: center;
        color: #999999;
      }

      .esri-item-gallery .esri-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .esri-item-gallery .esri-null-title {
        color: #999999;
      }

      .action {
        color: blue;
        cursor: pointer;
        text-decoration: underline;
      }
    &amp;lt;/style&amp;gt;
    &amp;lt;script&amp;gt;
      require([
        "esri/portal/Portal",
        "esri/identity/OAuthInfo",
        "esri/identity/IdentityManager",
        "esri/portal/PortalQueryParams"
      ], (Portal, OAuthInfo, esriId, PortalQueryParams) =&amp;gt; {
	  
        const personalPanelElement = document.getElementById("personalizedPanel");
        const anonPanelElement = document.getElementById("anonymousPanel");
        const userIdElement = document.getElementById("userId");
		


        const info = new OAuthInfo({
          // Swap this ID out with registered application ID
          appId: "YC0EFtVxMfyh9j8r",
          // Uncomment the next line and update if using your own portal
          // portalUrl: "https://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/arcgis"
		  portalUrl: "https://myportal.com/arcportal",
          // Uncomment the next line to prevent the user's signed in state from being shared with other apps on the same domain with the same authNamespace value.
          // authNamespace: "portal_oauth_inline",
          popup: false
        });
        esriId.registerOAuthInfos([info]);

        esriId
          .checkSignInStatus(info.portalUrl + "/sharing")
          .then(() =&amp;gt; {
            displayItems();
          })
          .catch(() =&amp;gt; {
            // Anonymous view
            anonPanelElement.style.display = "block";
            personalPanelElement.style.display = "none";
          });

        document.getElementById("sign-in").addEventListener("click", () =&amp;gt; {
          // user will be redirected to OAuth Sign In page
          esriId.getCredential(info.portalUrl + "/sharing");
        });

        document.getElementById("sign-out").addEventListener("click", () =&amp;gt; {
          esriId.destroyCredentials();
          window.location.reload();
        });

        function displayItems() {
          const portal = new Portal("https://myportal.com/arcportal");
          // Setting authMode to immediate signs the user in once loaded
          portal.authMode = "immediate";
          // Once loaded, user is signed in
          portal.load().then(() =&amp;gt; {
            // Create query parameters for the portal search
            const queryParams = new PortalQueryParams({
              query: "group: 59bd562ffc0c40e5b390ef9e58352de6",
              sortField: "numViews",
              sortOrder: "desc",
              num: 20
            });

            userIdElement.innerHTML = portal.user.username;
            anonPanelElement.style.display = "none";
            personalPanelElement.style.display = "block";

            // Query the items based on the queryParams created from portal above
            portal.queryItems(queryParams).then(createGallery);
          });
        }
		
		
        function createGallery(items) {
          let htmlFragment = "";

          items.results.forEach((item) =&amp;gt; {
            htmlFragment +=
              '&amp;lt;div class="esri-item-container"&amp;gt;' +
              (item.thumbnailUrl
                ? '&amp;lt;div class="esri-image" style="background-image:url(' + item.thumbnailUrl + ');"&amp;gt;&amp;lt;/div&amp;gt;'
                : '&amp;lt;div class="esri-image esri-null-image"&amp;gt;Thumbnail not available&amp;lt;/div&amp;gt;') +
              (item.title
                ? '&amp;lt;div class="esri-title"&amp;gt;' + (item.title || "") + "&amp;lt;/div&amp;gt;"
                : '&amp;lt;div class="esri-title esri-null-title"&amp;gt;Title not available&amp;lt;/div&amp;gt;') +
              "&amp;lt;/div&amp;gt;";
          });
			document.getElementById("itemGallery").innerHTML = htmlFragment;
		};
		
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="anonymousPanel" style="display: none; padding: 5px; text-align: center;"&amp;gt;
      &amp;lt;span id="sign-in" class="action"&amp;gt;Sign In&amp;lt;/span&amp;gt; and view your ArcGIS Online items.
    &amp;lt;/div&amp;gt;

    &amp;lt;div id="personalizedPanel" style="display: none; padding: 5px; text-align: center;"&amp;gt;
      Welcome &amp;lt;span id="userId" style="font-weight: bold;"&amp;gt;&amp;lt;/span&amp;gt; &amp;amp;nbsp;-&amp;amp;nbsp;
      &amp;lt;span id="sign-out" class="action"&amp;gt;Sign Out&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div id="itemGallery" class="esri-item-gallery" style="width: 100%;"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&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lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 10:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1060897#M73257</guid>
      <dc:creator>Den-GIS</dc:creator>
      <dc:date>2021-05-24T10:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Access ArcGIS Enterprise Portal items using OAuthentication and open the item (Web App) with click on Thumbnail</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1061613#M73278</link>
      <description>&lt;P&gt;You can add the target="_blank" attribute to the HTML element to open a link in a new tab or window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.w3schools.com/tags/att_a_target.asp" target="_blank" rel="noopener"&gt;https://www.w3schools.com/tags/att_a_target.asp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 22:38:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1061613#M73278</guid>
      <dc:creator>BenElan</dc:creator>
      <dc:date>2021-05-25T22:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Access ArcGIS Enterprise Portal items using OAuthentication and open the item (Web App) with click on Thumbnail</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1061810#M73282</link>
      <description>&lt;P&gt;Hi ben,&lt;/P&gt;&lt;P&gt;Thank you very much for your hint!&lt;BR /&gt;But that can't help me. The "href" only refers to a single URL. I currently have three apps in the group with the above group id in the ArcGIS Enterprise portal and thus in the gallery.&lt;/P&gt;&lt;P&gt;I searched online for a solution and found a little code (hint) from Rene Rubalcava (&lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript/how-to-access-function-in-require/m-p/240399" target="_blank"&gt;Solved: Re: How to access function in require([]) - Esri Community&lt;/A&gt;) that got me further.&lt;/P&gt;&lt;P&gt;I have expanded and adapted the "createGallery ()" function a little. When the user clicks on thumbnail, the corresponding url is written in the method window.open (); called up and the app is opened in a new tab.&lt;/P&gt;&lt;P&gt;In case anyone has better simpler solution feel free to post. Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;function createGallery(items) {
    let htmlFragment = "";

    items.results.forEach((item) =&amp;gt; {
        htmlFragment +=
            '&amp;lt;div class="esri-item-container"&amp;gt;' +
            (item.thumbnailUrl ?
                '&amp;lt;div class="esri-image" style="background-image:url(' + item.thumbnailUrl + ');"&amp;gt;&amp;lt;/div&amp;gt;' :
                '&amp;lt;div class="esri-image esri-null-image"&amp;gt;Thumbnail not available&amp;lt;/div&amp;gt;') +
            (item.title ?
                '&amp;lt;div class="esri-title"&amp;gt;' + (item.title || "") + "&amp;lt;/div&amp;gt;" :
                '&amp;lt;div class="esri-title esri-null-title"&amp;gt;Title not available&amp;lt;/div&amp;gt;') +
            // (item.description) + 
            "&amp;lt;/div&amp;gt;";
    });
    document.getElementById("itemGallery").innerHTML = htmlFragment;

    // add the event listeners
    var elements = Array.from(document.querySelectorAll(".esri-item-container"));
    elements.forEach(element =&amp;gt; {
        element.addEventListener("click", clickHandler);
    });

    // title of all apps and dashboards in the galery
    var app_1 = elements[0].innerText;
    var app_2 = elements[1].innerText;
    var app_3 = elements[2].innerText;

    function clickHandler(event) {
        // do something with clicked element

        var app_path_title = event.path[1].innerText;
        //console.log(app_path_title);

        var apps_url = items.results;
        //console.log(test_results);

        // apps url 
        var app_1_url = items.results[0].url;
        var app_2_url = items.results[1].url;
        var app_3_url = items.results[2].url;

        if (app_1 === app_path_title) {
            window.open(app_1_url);
        } else if (app_2 === app_path_title) {
            window.open(app_2_url);
        } else if (app_3 === app_path_title) {
            window.open(app_3_url);
        };
    };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 15:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-arcgis-enterprise-portal-items-using/m-p/1061810#M73282</guid>
      <dc:creator>Den-GIS</dc:creator>
      <dc:date>2021-05-26T15:07:06Z</dc:date>
    </item>
  </channel>
</rss>

