Jump 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.

Set Field script step Failure

Featured Replies

WinXP

FMAdv9

One-file solution

I want to import all records with “2008-2009” in the Year Field from Table A to Table B, but I want to check first to see if any records already exist in Table B with “2008-2009” in the Year Field. What is the best way to script this and are relationships needed?

I’ve tried the script below but I get a dialog that says “This operation could not be completed because the target is not part of a related table”. I’m confused because Tables A and B are related (by PersonID).

----

Go to Layout [“Table B Layout” (TABLE B)]

Enter Find Mode []

Set Variable [$Year; Value: Table A::globalYearField]

Set Field [Table B::Year Field; Table A::globalYearField]

Perform Find []

----

Using the Script Debugger, I noticed that this script fails at the “Set Field” step because the value (2008-2009) from the Table A globalYearField is not pasted/set in the Table B year field.

I hope you can help. TIA

If this is indeed a global then why are you even setting a variable here? Double check to make sure it is a global field.

  • Author

It is a global, so i tried the following and got the same error dialog -- “This operation could not be completed because the target is not part of a related table”.

---------

Go to Layout [“Table B Layout” (TABLE B)]

Enter Find Mode []

Set Field [Table B::Year Field; Table A::globalYearField]

Perform Find []

----------

I can't seem to get the year (2008-2009) to paste into the "Table B::Year Field". I can do it manually, but not with a script. I tried substituting Table C for Table B, and it works great! I'm willing to try anything to get this right.

Is this your real script? From this example, Table B::Year Field can be set because you are on a layout based on Table B. However, if this is just pseudo-code, I would check that you are indeed in the correct context to set the field.

  • Author

Thank you both! I examined the relationships and found an error.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.