Select to view content in your preferred language

URL parameters to 'Views' within same browser window

89
2
Jump to solution
2 weeks ago
ahargreaves_FW
Frequent Contributor

Hello,

I have an app configured within ExBuilder v11.3 as follows:

  • Several 'sections' all navigable via a 'View Navigation'
  • Lists on those sections allow me to 'Set Link' to open other views within the app

Here's what I need, alongside the above:

  • Select a feature on the map
  • Open the appropriate view within the app

There appears to be no way to set an action or link to allow this to occur. If I set a URL within the popup of the selected feature on the map using the below it does open to the correct view, but in a new browser tab:

https://myportal.com/portal/apps/experiencebuilder/experience/?id=bxxxxxxxxxxxxf&page=LEAK-%26-BREAK...

So how can I either:

  1. Set an action so a selected feature opens the view, or
  2. create a URL that opens the view within this browser tab?
0 Kudos
1 Solution

Accepted Solutions
ahargreaves_FW
Frequent Contributor

I can answer my own question and hopefully help someone else. I figured out I can use Javascript within an arcade expression. I use the below in a arcade element within a popup and it works exactly as I need it to:

var OID = $feature.OBJECTID

var url1 = 'https://myportal.com/portal/apps/experiencebuilder/experience/?draft=true&id=bxxxxxxxxxxf&page=LEAK-...'

 var btn =  

'<div align="center">'

     + '<a href="'+ url1 + OID +'"style="background-color:#007BC1;;color:#ffffff;padding:10px; border-radius:10px;text-decoration:none;display:inline-block;text-align:center;"target="_self" onclick=\"window.open(this.href, "_self"); return false;\" >'

          +'<b>CREATE A NEW LEAK AT THIS ADDRESS</b>'

      +'</a>'

  +'</div>'

 

return {

  type : 'text',

  text : btn

}

This is how it looks. I need to refine this a bit to zoom the map into the same location but I’m on the right path…

  

View solution in original post

0 Kudos
2 Replies
ahargreaves_FW
Frequent Contributor

I can answer my own question and hopefully help someone else. I figured out I can use Javascript within an arcade expression. I use the below in a arcade element within a popup and it works exactly as I need it to:

var OID = $feature.OBJECTID

var url1 = 'https://myportal.com/portal/apps/experiencebuilder/experience/?draft=true&id=bxxxxxxxxxxf&page=LEAK-...'

 var btn =  

'<div align="center">'

     + '<a href="'+ url1 + OID +'"style="background-color:#007BC1;;color:#ffffff;padding:10px; border-radius:10px;text-decoration:none;display:inline-block;text-align:center;"target="_self" onclick=\"window.open(this.href, "_self"); return false;\" >'

          +'<b>CREATE A NEW LEAK AT THIS ADDRESS</b>'

      +'</a>'

  +'</div>'

 

return {

  type : 'text',

  text : btn

}


This is how it looks. I need to refine this a bit to zoom the map into the same location but I’m on the right path…

 OPEN NEW VIEW USING ARCADE.gif

 

0 Kudos
ahargreaves_FW
Frequent Contributor

I can answer my own question and hopefully help someone else. I figured out I can use Javascript within an arcade expression. I use the below in a arcade element within a popup and it works exactly as I need it to:

var OID = $feature.OBJECTID

var url1 = 'https://myportal.com/portal/apps/experiencebuilder/experience/?draft=true&id=bxxxxxxxxxxf&page=LEAK-...'

 var btn =  

'<div align="center">'

     + '<a href="'+ url1 + OID +'"style="background-color:#007BC1;;color:#ffffff;padding:10px; border-radius:10px;text-decoration:none;display:inline-block;text-align:center;"target="_self" onclick=\"window.open(this.href, "_self"); return false;\" >'

          +'<b>CREATE A NEW LEAK AT THIS ADDRESS</b>'

      +'</a>'

  +'</div>'

 

return {

  type : 'text',

  text : btn

}

This is how it looks. I need to refine this a bit to zoom the map into the same location but I’m on the right path…

  

0 Kudos