# Scripted find fails "set field" step

**URL:** https://the.fmsoup.org/t/scripted-find-fails-set-field-step/1932
**Category:** Questions
**Tags:** scripting, find
**Created:** [March 20, 2021, 8:13pm UTC](https://the.fmsoup.org/t/scripted-find-fails-set-field-step/1932 "2021-03-20T20:13:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)
#### Post date: [March 20, 2021, 8:13pm UTC](https://the.fmsoup.org/t/scripted-find-fails-set-field-step/1932/1 "2021-03-20T20:13:34Z")

</div>

I am trying to search a developer layout. If I perform the search manually, everything works fine. When I script the find (and step through the script using the debugger) step 7 (set field) does not work, but does not give me an error. The next step (perform find) returns the error "relationship is missing". Any suggestions?

 ![Capture0031_find_failure](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/5/50ff85c86e5088e2913ccfa0df9c80f2603d47fa.jpeg)

---

<div class="post-metadata">

### Author: ![jwilling](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/jwilling/32/256_2.png) [@jwilling](https://the.fmsoup.org/u/jwilling)
#### Post date: [March 20, 2021, 8:56pm UTC](https://the.fmsoup.org/t/scripted-find-fails-set-field-step/1932/2 "2021-03-20T20:56:13Z")

</div>

It looks like your layout `@Catalog` is based on the Table Occurrence `CATALOG` but it should be based on the `@Catalog` TO.

---

<div class="post-metadata">

### Author: ![steverichter](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/steverichter/32/1022_2.png) [@steverichter](https://the.fmsoup.org/u/steverichter)
#### Post date: [March 20, 2021, 9:16pm UTC](https://the.fmsoup.org/t/scripted-find-fails-set-field-step/1932/3 "2021-03-20T21:16:06Z")

</div>

Thanks, @jwilling -- that fixed it. I've only recently started building @developer tables and have a bit to learn. I appreciate your help.
