1 Reply Latest reply on Feb 2, 2010 9:10 AM by TSGal

    sending comma separated data to multiple fileds via a push of a button



      sending comma separated data to multiple fileds via a push of a button


      I am currently using excel to accept comma separated data from a line of text from a web site.  Basically I go to the web site, high light the line of text, copy, go to excel, paste the data, which then

      gets pasted to different cells in the same row.


      I wanted to make a FM user interface that has the embedded web page on a tab, high light the line, copy it,  and then paste it to a field, which then would send it to the last row of the database table, ie creating a new record.


      Actually I would like to be able paste the data, hit a VERIFY button which would see if the data is already in the table and if it is in the table it would send a popup to the user indicating the data is already present.  Otherwise it would notify the user that the data has been successfully added to the data base table.


      Does anyone have some insight on this?



      Tim C. 

        • 1. Re: sending comma separated data to multiple fileds via a push of a button



          Thank you for your post.


          Pasting the information into a field is not difficult.  However, you will need to create a script that evaluates the information, searches, and if not found, then add a record.


          Create a Text field, PASTE, with global storage.  This will be used to evaluate the pasted information.


          Create a script that does the following:


          Set Error Capture [ On ]

          Set Variable [ $info ; <calculation to retrieve search information> ]

          Enter Find Mode []

          Set Field [ <search field> ; $info ]

          Perform Find []

          If [ Get ( FoundCount ) = 0 ]

             New Record/Request

             <put your Set Field statements here>


             Show Custom Dialog [ "Record already exists" ]

          End If




          That is, find the search criteria in the pasted text and put it in the variable $info.  Then, go into Find Mode and put the contents of $info into the field you want to search by and perform a find.  If no records are found, then you do not have an existing record, so add a new record and put the information into the appropriate fields.  Else, if an existing record is found, then display a dialog box that the record already exists.


          Finally, attach this script to a (VERIFY) button on the layout.


          If you need clarification for any of the above steps, please let me know.



          FileMaker, Inc.