Прескочи към главното съдържание

Querying Custom Fields - База знание / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. For the most up-to-date version, see: Querying Custom Fields

Querying Custom Fields

Списък с автори

One of the strengths of Deskpro is the flexibility it provides with the custom fields you can add to tickets.

As the fields are custom though, any you add will not be referenced in the reporting documentation.

The way we work around this is by using:

tickets.custom_data[#] 

 

You need to add the field ID to the field and it can be referenced in the same way as other fields in the tickets table such as tickets.id or tickets.status.


Locating the field ID


To locate the ticket ID you need to go into the following area in the agent interface:

Admin > Tickets > Fields 

And then select the 'Show IDs' option from the UI:


You can see from this that the field reference for the 'Address' custom field is #168


Example

Based on this if I wanted to run a query showing ticket IDs and the Address entered in the custom field for those tickets I can run the below:

SELECT  tickets.id, tickets.custom_data[168]

FROM tickets

Полезно Не беше полезно

36 от 69 души смятат тази страница за полезна

Добави коментар

Моля, логнете се или се регистрирайте, за да оставите коментар.

Нуждаете се от подсещане за парола?