Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script to create record using data from another table

Featured Replies

Our employees send requests for task numbers to be added into our timesheet software so they can bill for time spent on a project.

Our previous method for doing this was very inefficient.

Someone would make a request using and Outlook Form. Because not all requests get approved, it would be sent to the team admin to review. She would forward it to accounting. Accounting would add the task to timesheets and print a sheet at the end of the day with a list of what was added that day. Accounting would take the list to the team admin. She would sift back through her e-mails to find the requests that were set up and manually enter all of the data into FileMaker.

NOW...

I have created a request form in FM. I have set up a button to send the request to the appropriate individuals and have gotten stuck as to the best way to move forward. Accounting still gives the list to the team admin. Since the inital request was done in FM I assume that it should be easy to set a script that copies the data from the request record and pastes it to a new "approved" record in another table.

I had started a script that was basically:

Copy [select; ASA Requests::date_requested]

Go to Layout ["ASA Form" (Additional Service Authorization:]

New Record/Request

Paste [select; Additional Service Authorization::date_requested

then copy and pasting over and over until all of the fields were done.

There has to be an easier/better way!

I would appreciate any input.

The_APPROVED_layout.pdf

The_Request.pdf

Edited by Guest

Dana,

You can always have a script that performs an import of the current record into the other table. It should create a new record with all information of all the match fields that you have set up.

  • Author

This my be stupid but how do I get it to only import the one current record? Do I just create a found set with that one record or is there a better way?

  • Author

However ugly I may have made this script...it WORKS!

ASA_Setup in Sema4

Copy [ ASA_Requests::z_keyP_ASA_Requests_id ]

[ Select ]

Enter Find Mode [ ]

Paste [ ASA_Requests::z_keyP_ASA_Requests_id ]

[ Select ]

Perform Find [ ]

Import Records [ Source: “file:Wal-Mart Database”; Target: “Additional Service Authorization”; Method: Add; Character Set: “Windows ANSI”;

Field Mapping:

Source field 2 import to Additional Service Authorization::project_number

Source field 3 import to Additional Service Authorization::asa_short_description

Source field 4 import to Additional Service Authorization::asa_long_description

Source field 5 import to Additional Service Authorization::source_of_change

Source field 6 import to Additional Service Authorization::discipline_affected

Source field 7 import to Additional Service Authorization::project_status

Source field 9 import to Additional Service Authorization::arch_principal_hours

Source field 20 import to Additional Service Authorization::arch_archIII_hours

Source field 22 import to Additional Service Authorization::arch_archII_hours

Source field 26 import to Additional Service Authorization::arch_archI_hours

Source field 29 import to Additional Service Authorization::arch_internIII_hours

Source field 32 import to Additional Service Authorization::arch_internII_cadIII_hours

Source field 35 import to Additional Service Authorization::arch_internI_cadII_hours

Source field 38 import to Additional Service Authorization::arch_cadI_hours

Source field 41 import to Additional Service Authorization::arch_admin_hours

Source field 44 import to Additional Service Authorization::arch_graphic_designer_hours

Source field 47 import to Additional Service Authorization::arch_graphic_renderer_hours

Source field 51 import to Additional Service Authorization::arch_not_to_exceed

Source field 52 import to Additional Service Authorization::mep

Source field 53 import to Additional Service Authorization::struct

Source field 54 import to Additional Service Authorization::struct_not_to_exceed

Source field 55 import to Additional Service Authorization::mep_not_to_exceed

Source field 57 import to Additional Service Authorization::asa_phase

Source field 58 import to Additional Service Authorization::additional_comments

Source field 59 import to Additional Service Authorization::date_requested ]

[ No dialog ]

Go to Layout [ “ASA Form” (Additional Service Authorization) ]

Go to Record/Request/Page

[ Last ]

December 22, 2005 13:09:09 -1- Wal-Mart Database - ASA_Setup in Sema4

Thanks for the help.

Yes Dana.

Find only the record you want to export to return a found set of 1. Then when you do your import, it will only import one record.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.