ATF - Input variable from a different table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 11:13 AM
I am trying to setup an automated test in IRM that is trying to validate fields (including a custom field and behavior) that requires creating a record from 2 different tables so that second record can refer to the first one. In order, I am trying to:
- Create a record in the Control objective [sn_compliance_policy_statement] table
- Create a record in the Control [sn_compliance_control] table
- In the second record, refer to the first record using the Control objective field (which allows me to search for an existing control objective record
While all of this is successful when testing manually, in ATF, if I try to "Open a new form" from the Control table and "Set field values" for the control objective field using an input variable from the previously submitted Control Objective form, it fails giving me an error message of "FAILURE: Failed to set field 'category' to value '8bc355143bdee210deb64b54c3e45a10' because the reference is NOT valid".
I tried to verify the following:
- It was not a security related issue (the user I created had the same roles as myself when I manually tested)
- I also tried impersonating myself to be sure
- It was not an application scope issue (since it seems that I can do it manually with no issues under the same application)
- I am able to use "Open an existing record" in the same control objective form after I successfully submit it, so the record does indeed exist
Here's what the test steps would look like:
What is the cause? And if this error is inevitable the way I am doing it, is there a workaround to test the same thing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 11:22 AM
Actually I mispoke, the error isn't from the control objective field itself, but rather the Category N1 which was indeed present in the Control Objective. The question remains, why would it not be able to populate the Category field considering they are using the same reference list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 10:26 PM
One Possible reason could be because ATF runs tests much faster than the UI, and reference lookups may not complete in time for ATF to validate the reference value. So even though the record exists, the field’s internal list of valid choices doesn't yet contain it.
Second reason could be that if the Category field uses a reference qualifier that depends on another field being set, ATF may try to set the Category value before the dependent field is set — leading to invalid reference errors. You can try by creating two separate "Set field Values" step, one for category and another for control objective.
Also, you can use a Server Script to set the Category.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2025 06:29 AM
I attempted the option to create a separate Set Field Values step, but the result is still the same. As for the server script, I'll probably end up resorting to that, though I really wanted to get that one through UI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2025 04:23 AM
Hi @StevenU
Category N1, is it supposed to be "Due diligence"...?
in the screenshot, it is set to some dropdown value instead of reference