[SOLVED] Not able to query dynamic fields dropdown values

Moderator: crythias

Post Reply
ramon
Znuny newbie
Posts: 2
Joined: 13 Jul 2017, 11:48
Znuny Version: OTRS5s
Real Name: Ramon

[SOLVED] Not able to query dynamic fields dropdown values

Post by ramon »

Hello,

I've been working on a script to export values directly from the OTRS database but I can't manage to find where to retrieve the dynamic fields drop-down values. The location of the values is this one:
https://domain.com/otrs/index.pl?Action ... down;ID=14

I have the keys which are shown in the website as well, but not the values. I even checked the database schema but I don't find where they are stored. I have also searched in the whole database. The only place we see the values is in a cached object binary file, which of course can't be queried.

There are several topics related to this issue, but I don't find further help. Is this a bug? Where could we find more information about it? Thank you so much for your help.


Kind regards.
Ramon
Last edited by ramon on 20 Jul 2017, 10:33, edited 1 time in total.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Not able to query dynamic fields dropdown values

Post by RStraub »

If you really do not want to use the API, try this query:

Code: Select all

select config from dynamic_field where id=41;
Obviously change the ID to the id of the field you are looking for. This returns some json *like* result, you are interested in "PossibleValues".
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
ramon
Znuny newbie
Posts: 2
Joined: 13 Jul 2017, 11:48
Znuny Version: OTRS5s
Real Name: Ramon

Re: Not able to query dynamic fields dropdown values

Post by ramon »

RStraub wrote:If you really do not want to use the API, try this query:

Code: Select all

select config from dynamic_field where id=41;
Obviously change the ID to the id of the field you are looking for. This returns some json *like* result, you are interested in "PossibleValues".
Hello,

Thank you so much! This is exactly what I wanted. I couldn't find it how in the documentation.

For those looking for the query:

Code: Select all

select convert (config using utf8) from dynamic_field where id=41;

Best regards.
Post Reply