DataB View - How to get display value of a sys_id reference field from answer

MargaridaF
Tera Contributor

Hello, 

 

In order to report fields from the table [sc_multi_row_question_answer] a DB view was created with the following logic: 

 

table : sc req item variable prefix: sci where clause : mrqa_parent_id=sci_sys_id
table: sc_multi_row_question_Answer variable prefix: mrqa where clause : none  (print attached) 

 

Now, although I'm receiving the information I was looking for - as expected - the variables questions that are of type reference come with the sys_id. I'm looking to return the display value of the sys_id, in this case, the Company Code name. I thought about joining also the [core_company]  but Im struggling the logic to add an extra table in order to do this. 

 

The current DB View 

MargaridaF_0-1729083197850.png

The current list view 

 

MargaridaF_2-1729083316118.png

 

 

1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

You should have a different Order for each Table - I don't think it matters which is higher in this case.  You can add the core_company table with a Where clause like

mrqa_value=co_sys_id

Assuming 'co' is the prefix you use for the new table.  You'll want Left join = true on this one so that the other MRVS variables are shown.

View solution in original post

1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

You should have a different Order for each Table - I don't think it matters which is higher in this case.  You can add the core_company table with a Where clause like

mrqa_value=co_sys_id

Assuming 'co' is the prefix you use for the new table.  You'll want Left join = true on this one so that the other MRVS variables are shown.