AnsweredAssumed Answered

Displaying a Record Based on Numeric Code Passed Via XML in Web Direct

Question asked by allan_kapoor on May 29, 2018
Latest reply on May 30, 2018 by wimdecorte

I am building a tool that is intended for use in Web Direct only. I have created a js/html map that is displayed through a web portal. When a user clicks on an element  in the map, the js sends an XML request triggering a FileMaker script and passing a numeric code as a parameter into that script. Here is the js:


function sendSegId() {

    console.log("XML request sent");  

      var xhttp = new XMLHttpRequest();"GET", ""+segId+"&-findall", true);


    console.log("XML request executed");



The FM script that gets triggered should call up the record that corresponds to the numeric code on a separate layout:


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

Go to Layout [“ProjectFolder” (Segments); Animation:None]

Enter Find Mode [Pause:Off]

Set Field [Segments:: IdSegment; $Variable]

Perform Find [ ]


However, the process is not working as I had expected. I have successfully passed the js variable into FM (for example, I can get it to populate the code into a table), but for whatever reason, I cannot get the FM script to run and take the user to the next layout. Does anybody know what I am doing wrong? I feel like I'm missing something basic. Thanks!