Database View - "invalid field" error with accurate field name

scwillson
Mega Guru

Hello, I am attempting to construct a database view in order to be able to report on variables from Record Producers (variables that don't necessarily cascade to the respective table).

I build a Database view containing Incident and Question Answer (question_answer is the table that contains all the Question and Answers from record producers). There is a field on question_answer that contains the sys_id of the record generated by the record producer, that it is related to; this field is called "table_sys_id".

I gave the Incident table a prefix of "inc" and the Question Answer table a prefix of "qa". The Where Clause fields were filled out as follows:

  • [question_answer] clause: qa_table_name = 'incident'
  • [incident] clause: inc_sys_id = qa_table_sys_id

For   both of these, I get the ERROR saying that the field name is an invalid field or not visible. This is for "qa_table_name" and "qa_table_sys_id"

I am unsure how to get this working. I am 100% sure that the field names are correct, so I'm assuming that the problem relates to them not being "visible". Any suggestions?

Here are my screenshot:

NOTE: only 1 of the 2 errors show at a time, it just depends which view table has a lower order. This screenshot is when "qa_table_name" is first.

find_real_file.png

1 ACCEPTED SOLUTION

scwillson
Mega Guru

Thanks for the dialog Jaspal, I've figured it out.



When it says that the field is not available or visible, I just added the specified field to the "view fields" under the appropriate "view table" record.



find_real_file.png


View solution in original post

7 REPLIES 7

That is what I originally, and it doesn't work for me.


This is very odd that it worked for you.   I tried it again, but I still get the error.



find_real_file.png


Try replacing



inc_sys_id=qa_table_sys_id



with



inc.sys_id=qa.table_sys_id


scwillson
Mega Guru

Thanks for the dialog Jaspal, I've figured it out.



When it says that the field is not available or visible, I just added the specified field to the "view fields" under the appropriate "view table" record.



find_real_file.png