Set relationship query

omsa1
Kilo Guru

Hi There,

I need help with this. I created a new table called problem2 and a related list relationship called "linked tickets". i've added new button for related problem link so that users can add record into problem2 table using this button . When i add query , from table problem2 to table problem   and added query current.addquery('problem'.sys_id); its showing all the records in that Problem 2 table , not the one created under particular problem ticket. how can i filter only problem2 table record that was created under that particular problem ticket. for example problem ticket should have only one problem2 table record. but its showing all the records under problem2 table. Please help.

find_real_file.png

1 ACCEPTED SOLUTION

Hi Chuck,



Thank you that was is the one causing the issue. I created problem reference field in problem2 table and then it gave me problem2-->problem....i added that to related list and renamed the label to Linked Tickets..its working as expected..Thanks for your help and input appreciate it.


View solution in original post

7 REPLIES 7

Chuck Tomasi
Tera Patron

Check the syntax of your query. If it is malformed, it is basically ignored. This, in particular, caught my eye from your description.



current.addquery('problem'.sys_id);



You might want to try,



current.addQuery('problem', current.sys_id);



Note the capital Q on the method, and two parameters sent to the method.


Hi Chuck,



I tried current.addQuery('problem', current.sys_id); Its still showing all the records


I was being general in the advice to fix the obvious things. Without more detail about the table structure, the relationship definition, and what you are trying to do, I cannot offer any more specific insights.


Hi Chuck,



I have only 3 fields in problem2 table , source,URL, Relationship and none of them getting problem number, is that causing the issue.


does it need a field in both tables has same value (like problem number) inorder to filter the records. Should i create a problem number field in Problem2 table to filter the records ?