related list using Relationship

rajachodisetti
Tera Contributor

Hello.
I'm working on creating a Query script for Relationship.

applies on table : rm_story

Queries on table :sn_test_management_m2m_test_set_test
I would like to use the test set of the current record to narrow down the records displayed in the related list, but I am having trouble getting the test set in story related list
How can I get the test set of the story in currently displayed record?
thank you.

4 REPLIES 4

James Chun
Kilo Patron

Hi @rajachodisetti,

 

Try the following query script (note that I am assuming that the field name of the [rm_story] reference on m2m table is rm_story)

 

current.addQuery('rm_story', parent); //replace with the right column name from the m2m table if it's different

 

Cheers

M2m table has no direct relation form story table

Test table name : sn_test_management_test
Test set table name:sn_test_management_m2m_test_set_test

story table name: rm_story
there is no direct relation form test set and story
the relation is from test to test set and test to story
we need to show the test sets in test set related to that story
currently it is showing all records in test set table

Right, these are OOB tables, thought you created them.

 

I am not familiar with the Test Management module but I can see how the Test and Test Set records are related. However, I don't see how Story is related to a Test [sn_test_management_test] record.

If you can elaborate on the relationship between a Story and a Test record, I can help with the query.