Relationship Between 2 table

David Boom
Tera Contributor

I have one custom table with field "number". It is string type field and auto-populating with incident number. I want this table to be in related list of incident table. In related list only records with same incident number should be visible.

1 ACCEPTED SOLUTION

Chaitanya ILCR
Kilo Patron

Hi @David Boom 
You can create a custom relationship

applies to table = custom table where you want to add this related list

ChaitanyaILCR_0-1741087526576.png

once submitted configure the related list and find the relationship name in the slush bucket and add it 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

6 REPLIES 6

Deepak Shaerma
Kilo Sage

hi @David Boom 

    • Navigate to the Incident table form (System Definition > Tables, then select the Incident table).
    • Right-click on the form header and select Configure > Related Lists.
  1. Add Your Custom Table to the Related Lists:

    • In the Related Lists configuration, find your custom table in the list on the left and add it to the right side. This will add your custom table as a related list on the Incident form.
  2. Configure the Related List to Filter by Incident Number:

    • Click on the wrench icon (Configure Related List) next to your custom table in the right-hand panel to access its settings.
    • Here you can specify how to filter records. To show only records that match the incident number:
      • Set the filter condition. You will want to filter where the number field in your custom table matches the number field in the Incident table.
      • You would set it like this:
        • Condition: incident.number = your_custom_table.number


Chaitanya ILCR
Kilo Patron

Hi @David Boom 
You can create a custom relationship

applies to table = custom table where you want to add this related list

ChaitanyaILCR_0-1741087526576.png

once submitted configure the related list and find the relationship name in the slush bucket and add it 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Hi @David Boom ,

 

Please note that: 

Applies to table -> Table where you want to show relation ship. "Incident"

Query from -> Custom Table 

 

as you need Related to be in Incident Table. 

 

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit

Rohit  Singh
Mega Sage

Hi @David Boom ,

 

1. Create a custom relationship (system Definition -> relationship)

2. Applies to table -> Table where you want to show relation ship. "Incident"

3. Query from -> Custom Table

4. In script use : current.addQuery("number",parent.getValue("custom_field_name")

5. In incident form using configure Related list bring you Custom relationship which you have created in first step.

 

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit