Jump to content

script and copying data from a field


hociman
 Share

This topic is 5773 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a field that is specified as a button. When I click on the button, a pop-up window appears where I select what data I want to assign to the field that was clicked on for the current record. When no data is assigned to this field, it reads Please Specify Company.

I have written a script that duplicates most of the fields in the current record and puts their contents in a new record, the Company field being one of them. Unfortunately, my script is not duplicating the company name from the current record to the new record. I suspect this is because the Company field is a button that the user clicks on in order to get a window where the Company is selected.

My script steps are:

1. Go to Record/Request/Page (Previous)

2. Go to Field [select/perform; Company::Name]

3. Copy [Company::Name]

4. Go to Record/Request/Page (Next)

5. Go to Field [Company::Name]

6. Paste [select; Company::Name]

While this seems logical to me, it is not doing what I would like it to do as outlined above. Is this not possible in any version? Is it only possible in v8? Is it possible in v7, and I am just not using the proper script steps? Any insight would be appreciated.

Thanks for reading!

Edited by Guest
Link to comment
Share on other sites

I'm not quite understanding why your one filed is not being duplicated with all of the others, because a duplicate record should be the same.

You would be wise to use "Set Field" instead of copy paste here to. Copy requires the field to be on the layout, Set Field doesn't. Also, you are changing the Clipboard when you do that.

HTH

Lee

Link to comment
Share on other sites

I am not using the duplicate record (Apple+D) command. I am duplicating some of the fields on a layout when creating a new record. This is how I want to do this. I know I have a low post count, and I will not claim to be a FMP genius, but please trust me on this.

I edited my script so that the steps are as follows:

1. Go to Record/Request/Page (Previous)

2. Go to Field [select/perform; Company::Name]

3. Copy [Company::Name]

4. Go to Record/Request/Page (Next)

5. Go to Field [Company::Name]

6. Set Field [select; Company::Name]

The one field is still not having its value duplicated to the new record. Does anyone know if there is an error in my script, or am I trying to do something that cannot be done?

Link to comment
Share on other sites

You would need to copy the field before going to the new record to paste

Copy [ Untitled::Field A ] [ Select ]

New Record/Request

Paste [ Untitled::Field A ] [ Select; No style ]

Or

after creating the new record, you would need to navigate back the Previous record, copy the field then move back to Next record and past.

Go to Record/Request/Page [ Previous ]

Copy [ Untitled::Field A ] [ Select ]

Go to Record/Request/Page [ Next ]

Paste [ Untitled::Field A ] [ Select ]

Lee

Link to comment
Share on other sites

after creating the new record, you would need to navigate back the Previous record, copy the field then move back to Next record and past.

Go to Record/Request/Page [ Previous ]

Copy [ Untitled::Field A ] [ Select ]

Go to Record/Request/Page [ Next ]

Paste [ Untitled::Field A ] [ Select ]

Lee

That's a bit more efficient than what I was doing. Thanks! Unfortunately, my one (1) field is still not having its contents duplicated. I really think it has something to do with the field being a button. Can fields that are buttons only be duplicated with the duplicate record command (which is not useful in my situation).

Thanks for reading!

Link to comment
Share on other sites

In an attempt to clone the database and have it working for others to see, I found the cause of the problem. It turns out that someone who tried to do me a favor made the field I was having difficulty duplicating a field whose value was based upon a calculation. So I changed that and now life is good. Thanks for pointing me on the right track!

Link to comment
Share on other sites

This topic is 5773 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Similar Content

    • By Tony Morosco
      I'm a botanist, and the tables I am working with are for tracking botanical garden collections. The data represents plants in the garden, and the plants are tagged and show up in the database.  The tables I am working with were created in FMP 7, and I'd like to open them up in FMP 11 (or later.)  The system hasn't been used in years, but still has valuable information.
      One of the tables is giving me problems using the FMP convert and recover commands.
      These tables are all inter-related.  The main table is the Accessions table, which contains records for all of one kind of plant, from the same source, received on the same date.  It is basically a museum standard.
      The other tables are related to each other through this one main table.  The Species table is related to the locations table through the Accessions table. 
      (i.e.  table A relates to table C through the table B, the intermediary)  
      From the Locations table, we can't see the the species information unless the accessions table is present.
      When issuing the open command on the main table to convert the database to FMP 11, I get the message:
      "Accessions.fmp7" is damaged and cannot be opened.  Use the Recover command to recover this file. When using the Recover command from v. 11, I get another message:
      WARNING: problems were detected while recovering the database.  Please review the Recover.log file to see where problems were found and their severity.  The recovered file should NOT be used going forward; copy only the most recent work from it into a backup copy of the original file. Recovery results:   File blocks: scanned and rebuilt 563 blocks, dropped 214 invalid data blocks.   Schema: scanned fields and tables, 1 items modified   Structure: scanned; 1 items modified   Field indexes: rebuilt  
      Opening the recovered database, there are only three records present.  There should be hundreds.  So obviously I am looking on how to wrangle this database open.
      I've attached the log file here, as well as the database structure map.  
      The other files have converted just fine.  But since the main table won't open, we are kind of stuck.
      I can share the files with you through Dropbox or whatever, if needed.
      Please let me know any thoughts you have, either basic or advanced.  And ask for any clarifications or additional questions.   :-)  
      Thanks!
      -Tony
      Recover.log

    • By Tumma K
      Hello, All!

      I am an aspiring developer for Filemaker. The company I work with is stuck in the past working off of Filemaker Pro 4.1

      I was given the task of bringing us up to Filemaker Pro/Server 13. So far my conversion prototypes are successful but we recently had a layout issue that can only be fixed in versions 3-6 (as the file is an .fp3) I work off of a macbook while our network is all Windows 7. In order for me to repair the layouts without tampering our active database, I decided the best option is to repair a copy of our solutions off the network. Unfortunately, when I go to download the trial version of Filemaker Pro 6 off of the respected website, the file is corrupt! I've tried multiple times, with different extraction apps and in different directories.

      My question is;

      Does anyone know a place where I could obtain version 6 (or better yet, 4.0) for an OSX computer? I've looked everywhere!
       
      Thank you for your time,
      Tumma K.
    • By MrEddByrnes
      I'm hoping my question can have a happy ending. In the mid-90's, I purchased Filemaker 3. When Filemaker 5.5 Pro was released, I bought the update CD, which requires the user to either have FM 3 installed or to have the installation CD for FM 3. I've used it all these years, most recently with Windows XP Pro, and it has worked just fine. The databases I began with were long ago converted to FM Pro 5.5 databases.
       
      I'm still using FM Pro 5.5 on a laptop with WinXP Pro, but in 2013, I purchased a PC with Windows 8. I haven't been able to install FM 3 on it, therefore can't install FM Pro 5.5. I am retired and rarely use Filemaker, but I have a few Filemaker databases I'd like to add to my Win 8 machine. I don't feel it's worth upgrading FM for the sake of using a couple of databases.
       
      Has anyone else run into this situation and/or have a (possible) solution? Is there perhaps any other software that can read FM 5.5 databases? Thanks in advance for your help.
       
    • By bmill
      I am using a custom filemaker solution for medical office billing written with fp5 running on a mac with snow leopard. In addition, I have a patient management db (which I wrote) that is linked through pt. ID number to the billing program allowing transfer of some demographic information (name, DOB, etc).
       
      Other than being limited by hardware restrictions, the billing program serves our needs for now and upgrading to fp12 will take some time (and money).  In the meantime, I am upgrading my pt. management program to fp13 and would like to move new patient demographic information from the billing program ( fp5 running on snow leopard through Parallels) and the new pt management program ( fp13 running on OS X 10.9) on the same mac.   
       
      Ideally, demographic information would be entered once into fp5 and then a scipt would make the data available for fp13.
       
      Any ideas on how to make this work?
    • By randyinla
      Hi, can anyone tell me why my on-line database might have stopped allowing me to delete records?  All of my access privileges and passwords are correct.
       
      thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.