I tried to use a database field [XEUSER.USERNAME] as a filter
but it can't display on my question,and I changed another field[xeuser.remark],and it displayed, so can anyone tell me what's the metter about the field "username"?
Hi @Feasoul
You cannot use Field Filters with table aliases:
https://www.metabase.com/blog/field-filters/index.html
thank you for reply. But forgive my slow-witted. I think I didnât use a table aliases. do you mean it like the âXEUSERâ of âXEUSER.USERNAMEâ?
Or the field âUSERNAMEâ used in the SELECT canât be used as a field filter?
@Feasoul You are using "DP"."XEUSER" "Xe User"
, where "Xe User"
is a table alias - and since youâre using a Field Filter on that table, then it will reference the original table, which youâre then not including in your query, because you have aliased it.
got it, So should I modify the âXe userâ to the Original table name âXEUSERâ ďź
I have tried in this way. I'm sure there's no table alias,so what's the matter?
I'm really getting mad about this problem......
@Feasoul
As noted in the Field Filter documentation about Oracle - you have to use full table reference
FROM "DP"."XEUSER"
And USERNAME
has to be one of the Field Types listed here:
https://www.metabase.com/docs/latest/users-guide/13-sql-parameters.html#creating-sql-question-filters-using-field-filter-variables
thank you ,I've been read the rule for many times,
but it still doesn't work.
I really can't understand the diff between "Username" and "Duty" ,cause of they are the same use,the same type,the same Database typeďźvarchar(32)ďź.
but there is one thing, the count of "username" is 40
but the "duty" is 3ďźis this the problemďź
- Post âDiagnostic Infoâ from Admin > Troubleshooting
- Which version of
ojdbc8.jar
? - Go to
http://metabase.example.com/api/field/:id
for bothUSERNAME
andDUTY
and post the responses here. You can find the ID for each field by looking in the URL of your browser, when you go to Admin > Data Model > (database) > (table) > (column)