8 Replies Latest reply on Sep 20, 2014 3:58 PM by EdwardMcPikeJr

    Copy to Clipboard in Web Direct.  Whither art thou?

    ideawise

      So I know that the standard copy script step doesn't work via web direct, but in the filemaker help there are notes which say...

       

       

       

      With FileMaker WebDirect, the Copy script step does not place data onto the Clipboard.

       

       

      If you manually select field data before you run this script step in FileMaker WebDirect, the script step performs as if you did not make a selection. To select field data before you run this script step in FileMaker WebDirect, use theSet Selection script step.

       

       

       

      Which seems to me to be saying that you can use the "Set Selection" script step in Web Direct immediately before using the "Copy" script step, and that it should work.

       

      Well it doesn't work for me. Am I missing something or reading it wrong?

       

      I've tried I think all the itterations of settings on each of these two steps, also in separate scripts, and together. No dice in Web Direct.

       

      I realize there are security concerns. Looked at javascript and flash methods too. None look pretty.

       

      What is this Filemaker help note saying? It SEEMS to be saying it's possible.

       

      Any help or suggestions for alternatives would be great. (I am not averse to triggering a script, but don't want to use flash methods)

       

      Thanks in advance.

        • 1. Re: Copy to Clipboard in Web Direct.  Whither art thou?
          user19752

          You can use copied thing only in "Paste" script step.

          • 2. Re: Copy to Clipboard in Web Direct.  Whither art thou?
            mikebeargie

            Something like this should work:

             

            Set Selection [ table::field ; 1 ; Length(table::field) ]

            Copy

            Paste [ select ; table::targetfield ]

             

            What are you trying to do where you are not using paste?

            • 3. Re: Copy to Clipboard in Web Direct.  Whither art thou?
              ideawise

              Trying to copy the content to the system clipboard so they can paste it elsewhere.

               

              One instance is as an alternative to the "send mail" script step, because in some web browsers this function is blocked by pop-up blockers.  Also, if their eMail is web based, then unless they have specific settings on their side to trigger such a thing, it won't create a new eMail.

               

              So I just want to give them a quick way to copy an eMail address so that they can paste it.

               

              I know I can send eMail from within FileMaker too, but that also requires a lot of user specific settings. 

               

              Just trying to find a quick way to make particular content accessible to them in their other programs.  Not just eMail addresses.  Other content too.

               

              Any suggestions?

              • 4. Re: Copy to Clipboard in Web Direct.  Whither art thou?
                mikebeargie

                Remember in WD you are dealing with the functionality and limitations of whatever web browser is being used. By the time everything is on the client side it is no longer controlled by native filemaker, so the abilities should be assumed limited as such. Clipboard actions are specifically client side, so you can see the issue here.

                 

                You might be able to run some javascript in a webviewer to copy into the system keyboard, otherwise the copy script step will behave as FileMaker has made it.

                 

                Can they not manually highlight the text and use Ctrl + C to copy it? I can do that in WD and it works to copy a value out.

                • 5. Re: Copy to Clipboard in Web Direct.  Whither art thou?
                  ideawise

                  Hi Mike,

                   

                  Thanks for your replies.  Yes, they could manually copy paste, but 1.) I'm trying to make it push button easy, and also as an alternative choice to the system actually sending mail with the clicked on eMail address, for those cases where that simply won't work for reasons you mentioned.  And 2.) sad to say, but for some of my users manually doing a select copy and paste is actually a bit of an advanced procedure.  If you are in a world where this is not the case, then I envy you that.  For a number of my users, I need to make everything as easy and automated as possible.

                   

                  So I guess my question here was about the copy step which apparenly only works in WD within the context of filemaker fields.  That's what I'm hearing. 

                   

                  But what brought this about was me trying to use that step as an attempt to make it easy for many different types of users to quickly initiate a new eMail message from address content in a WD deployment.

                   

                  Sounds like copy is not going to work.  Any other suggestions?  (BTW, "Send mail" works great in FMGO, and on some browser/mail app combinations, but too many variables to just use that step)

                   

                  Thanks again.  I really appreciate the thoughtful replies.

                  • 6. Re: Copy to Clipboard in Web Direct.  Whither art thou?
                    mikebeargie

                    Like I said, you might be able to pass your data into a webviewer and execute some javascript that copies to the system clipboard. It will take a fair deal of elbow grease to figure out what will work (if at all), so I don't have the liberty of time to assist.

                     

                    Do a google search for "javascript copy string to clipboard" and you'll find plenty on the subject.

                    • 7. Re: Copy to Clipboard in Web Direct.  Whither art thou?
                      ideawise

                      Yes, thanks.  It's looking more and more like I'll have to go that route if I want to do this. 

                       

                      For now I'm going to look into other ways to trigger new eMail creation.  It's particularly challenging for something like Gmail because it requires them to have lots of specific settings.

                       

                      Thanks again for your help.

                       

                      I'm open to any other ideas too.

                      • 8. Re: Copy to Clipboard in Web Direct.  Whither art thou?
                        EdwardMcPikeJr

                        I use Email Forms in FileMaker in many of my solutions.  I set up (or get them to set up) a generic email address, like "dbserver@clientscompany.com" so that I only need to know one username/pw for SMTP purposes.  I send all mail from that.  You can then  have a user table where you can store their email address and whatever else you want to track, including their account name.  You can then grab that info and put it in global variables on login, and use it throughout the session.  When they need to email something, you can pop up a watered down email form with TO, CC, BCC, SUBJECT, and BODY.  When they click send, do it via SMTP using the generic account, but put the user's email in the Reply To field, and their name in the From field.  I do a lot more with it, but that's the basic version.