March 30, 200916 yr 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 ] 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
March 30, 200916 yr 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.
March 30, 200916 yr 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 ] 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.
March 30, 200916 yr 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.
Create an account or sign in to comment