You can display HTML stored in your application in a web viewer
Set a field with your HTML in it like so:
"data:text/html," & yourHTML
Now use that field as the URL of the webviewer.
So the server can create the HTML and set that to a field, and then the client display that HTML in a web viewer.
ditto what Carl says!
As for the Export? if OP can email the document but not find it for opening as URL, then we need to know what path is being used to save the document and using in the email attachment. Perhaps it needs to be in a location that FMServer can find for Open URL script step. Perhaps it's the format of the URL that needs adjusting.
We can see by the posted script, that @ayescas is using:
Get (TemporaryPath ) & "exportedrecords.html"
And this is good and correct for FMServer to save the file long enough to be emailed. (I would use .htm instead of .html for the extension, but either may be valid for the next steps)
Where the script step
needs a protocol (likely the 'file:' protocol)
When setting the $filepath in the Export script step is used the dialog shows examples of the file: path type.
This help topic also may be useful for getting the correct path:
Platform makes a difference in the URL!
Then because it's the temporary directory, the browsers may or may not allow opening an URL from there. (YMMV - your mileage may vary)
Thank you Carl and Beverly....going to try your feedback now !!!
How can I get the sever to insert the HTML document into a container field ? the insert script step is not supported on the server-side.
GOT IT TO WORK, on the insert from URL it had to be like this: "file:/" & $filepath
Note it only needed 1 forward slash. I was using two and three....
When I try to view the container in a web viewer by using: "data:text/html," & Field , I only get the file name in the web viewer, how can I show the HTML table, which is inside the container field ????
The answer to my question: