14 Replies Latest reply on Jun 13, 2016 4:36 PM by user22862

    Pasting a List of Items into a Portal?

    PeterTeneldas

      Greetings, I am using Filemaker Pro 15 and have a question about pasting lists.


      I created an Access database for my music collection, and am trying to recreate this database in FM. In Access, the main form has a field for Artist, plus fields for Timestamp and Genre.  Below is a continuous subform. 

       

      I can take a list of items that I’ve copied to the Clipboard, and paste it into a continuous subform via the Paste Append command.


      For example, here’s a list I can Paste Append into my Access database:

       

      Artist:  Monty Python

       

      Albums:

      Another Monty Python Record

      Monty Python's Previous Record

      Matching Tie And Handkerchief

      Live At Drury Lane

      Holy Grail

      Life Of Brian

      Contractual Obligation

      The Meaning Of Life

      The Final Rip-Off



      With Access, using the Paste Append feature, each separate line in this list is pasted into its own subform line. It works perfectly.

      I don’t see a similar option in Filemaker. I just see “Paste.” The above list would be entered all in one line, and not individual lines for each album.

       

      So...is there a way, to paste this list into a Filemaker subform portal, and have each line in its own separate line? If so, what is the procedure? Thank you. Peter Teneldas

        • 1. Re: Pasting a List of Items into a Portal?
          Extensitech

          I would use a script that pastes the clipboard into a global field, then loops through the list adding each line to the portal.

           

          HTH

          Chris Cain

          Extensitech

          • 2. Re: Pasting a List of Items into a Portal?
            PeterTeneldas

            Thank you for replying.  I have no idea how to write a script like that.  There isn't an easier way? 

             

            Just out of curiosity, why doesn't FM have a Paste Append feature as Access does?  It would make data entry so much easier.  Having that feature in Access, at least for me, is such a time saving tool. 

             

            (I don't want you to think I'm an Access sycophant.  Quite the opposite--I prefer FM.  But in this particular case, the Paste Append option does make Access easier to use.)

            • 3. Re: Pasting a List of Items into a Portal?
              siplus

              I like Filemaker letting you in full control of what happens.

               

              In your case, you will have to build a script which - as Extensitech said - will

               

              Isolate the Artist: XXX line, SQL your artist database for XXX, if there are no records create one, grab ID into a $var, if there's more than one stop and ask for a selection, if there's only one, grab ID, go to Albums table, find all + find omitted then loop create records in the table with the Albums: lines, then replace fk_Artist with the grabbed ID.

              • 4. Re: Pasting a List of Items into a Portal?
                PeterTeneldas

                I'm sorry.  I just don't understand.  Why is this so difficult?  I just don't understand why I need to write a script, which is something I've never done with FM, and why I need to involve SQL.  I know a little about SQL, but why I can do this so easily with Access but not with FM, I'm sorry, I just don't understand.

                • 5. Re: Pasting a List of Items into a Portal?
                  user22862

                  I totally understand your frustration, and have an example of this working. See this video link...

                   

                  I was building an interface for a client to add related records, quickly from a price sheet, and this is the fastest way I had come up with, that was fairly easy to construct.   https://drive.google.com/open?id=0Bzw0TW1bpBKZQjFRdV9GeVc4TGs

                   

                  Its just like they are saying, but without any SQL... I did have to add some steps to "cleanup" some stuff that sometimes gets pasted in from Excel... But overall, its not a terribly complex script.

                   

                  HOWEVER, as I see you are very new to the platform, scripting may be a bit intimidating for you! You will get over that quickly, and then begin to enjoy the benefits.

                  • 6. Re: Pasting a List of Items into a Portal?
                    PeterTeneldas

                    Thank you so much for replying.  When I try to access that link, it says I need permission and must request access.  (No pun intended.)

                     

                    As of right now, I am unable to view that video.  Looking forward to viewing it.

                    • 7. Re: Pasting a List of Items into a Portal?
                      user22862

                      No problem!! Sorry, forgot that folder is under lock and key!!! Here is a private link to a copy I loaded onto our Youtube channel. Give it a minute or two to process if you get an error..

                       

                      https://youtu.be/ZZnfh71SoKo

                      • 8. Re: Pasting a List of Items into a Portal?
                        user22862

                        I don't have a ton of free time, but since I myself was new, hell, I still am new, to this platform. I would gladly help you write your first script. I'm not here for a bill, so it would be free of charge, and simply an investment into our community.. Could also be because I'm naive enough to do so! haha.. But contact me if needed, and I'll assist where I can!

                        • 9. Re: Pasting a List of Items into a Portal?
                          PeterTeneldas

                          That is so kind and gracious of you to offer your time to help.  I viewed the video, and it was a bit beyond me.  I did catch a couple of things that I can focus on, however.

                           

                          I see there is a window in the upper right where you paste in a column of data.  There is a button that says ADD TO RELATED COMPONENTS.  When you click that button, it seems to take the data in that window and paste it into the portal.  Am I correct?

                           

                          Personally, I think that is too cumbersome and complicated for what I want to do.  However, if that is the absolute easiest way to achieve my goal, then so be it, unfortunately.

                           

                          What I would have to do is figure out how to create that window, and how to create that button.  I am assuming the button activates a script.  I don't know what type of window that is.  I assume it's just a basic text box and nothing more.

                           

                          So, the issue here is:  How do I generate the script that the button activates, and how to I customize it to work with my database?

                           

                          Am I right about this?

                          • 10. Re: Pasting a List of Items into a Portal?
                            user22862

                            You are correct in your assumption. The button is tied to the script that adds the records.

                             

                            To create the button is pretty easy when you are in layout mode. Tying it to a script is also pretty easy. Double click the button in layout mode and set the action to run script, and select the applicable script.

                             

                            The time consuming part is the script writing. Better yet, the learning to write part  

                             

                            I could paste the text of my script if you think it would help you, but I'm afraid it would take some time and some basic script experience to grasp fully, without some assistance.

                             

                            If you think it could be useful, just ask! I'm mobile at the moment, and may not catch a reply from you for an hour or so. FYI.

                             

                            Kevon R Binder

                            Doctor Flue, inc®

                             

                            Sent from a mobile device, please excuse brevity.

                             

                            This is an electronic communication, so there should be no expectation of privacy.

                            • 11. Re: Pasting a List of Items into a Portal?
                              PeterTeneldas

                              Kevon,

                               

                              Now you have me interested in rising to the challenge of learning scripting.  How about this...how about I take a little bit of time to read about Filemaker scripting.  Most likely, the majority of information will be over my head, but I do have some experience doing macros in Access and Word, so it's not like I'm going to be working in a total vacuum.

                               

                              I doubt I will figure out how to write this script on my own, so I will probably need my hand held through a few things.

                               

                              But let me do a bit of research, and when I feel ready to dive into the deep end (so to speak), I'll let you know.

                               

                              Fair enough?

                              • 12. Re: Pasting a List of Items into a Portal?
                                user22862

                                I'm yours when our scheduled can mesh, and you are ready for the hand! FYI. I'll be out from June  22nd to July 4th. Going through computer and Internet withdrawals while fishing in the wilderness.

                                 

                                Kevon R Binder

                                Doctor Flue, inc®

                                 

                                Sent from a mobile device, please excuse brevity.

                                 

                                This is an electronic communication, so there should be no expectation of privacy.

                                • 14. Re: Pasting a List of Items into a Portal?
                                  user22862

                                  LiveCode?? I am assuming?