4 Replies Latest reply on Sep 30, 2015 4:16 PM by KenDeFilipps

    capture variable parameter in web viewer / FMP URL

    KenDeFilipps

      Hi

      FMP 14

      I have a web viewer in which there is a java script variable called msg which contains a string of text.  I can get this variable to print to the web viewer page by doing this:

      In the body of the JS:

       

      function log(msg) {

                document.getElementById('msg').innerHTML += msg;

              }

       

      Then in the body of the web viewer, doing this prints the variable contents to the screen in web viewer:

      <div id=\"msg\"></div>

       

      However, when I try to pass this variable to a script within the local FMP DB, the script fires, but the variable parameter is empty.

       

      The script I am firing simply does the following script steps:

      Go to Layout [ “Resource” (Resource) ]

      Set Variable [ $SearchParam; Value:Get(ScriptParameter) ]

      Set Field [ Resource::RawString ; $SearchParam ]

       

      The FMP URL I am using in the web viewer currently is this,however I have tried many variations of the "param=" with no success.

      <div><a href=\"FMP://$/MyFmpDBV34?script=isolatemarkers&param=\"+ msg+\"\">Isolate</a></div> 

       

      What on earth am I doing wrong here.  Any help would be greatly appreciated.  Thanks.