1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

Custom Fields

Discussion in 'Using Kayako Classic' started by StevenSheeley, Aug 23, 2010.

  1. StevenSheeley

    StevenSheeley New Member

    Where does the custom field type file store the files? And how does one edit, update or delete the file that's been uploaded?


    I've created several custom field for organization records were we can attach documents and such for that organization. Where do these files get stored and how do you edit, change or delete the uploaded file?
  2. mikeonline

    mikeonline Established Member

    OK, so its been a while since this thread was opened! But I had the same question and found a solution.

    I borrowed from Luke Pinion's SQL query to craft a query to identify the FileID for each file uploaded to a given custom field:

    # Query to determine the File IDs for a custom field on a ticket

    USE `kayako_fusion`;
    SELECT cg.title customfieldgroup,
    cf.title customfield,
    cv.fieldvalue value_FileID,
    FROM swtickets t,
    swcustomfieldlinks cl,
    swcustomfieldgroups cg,
    swcustomfields cf,
    swcustomfieldvalues cv
    WHERE t.ticketid = 64080
    # specify the ticket ID above---------------------------------------------------------------------------------------------
    AND cf.customfieldid = 19
    # query the swcustomfields table for a list of custom fields. Substitute the proper custom field id, above----
    AND t.ticketid = cl.linktypeid
    AND cl.customfieldgroupid = cg.customfieldgroupid
    AND cg.customfieldgroupid = cf.customfieldgroupid
    AND cf.customfieldid = cv.customfieldid
    AND cv.typeid = t.ticketid;
    # Once you know the File ID, query the swfiles table for the true filename----------------------------------------

    # Query to determine the filename for a File ID

    USE `kayako_fusion`;
    SELECT `swfiles`.`fileid`,
    FROM `swfiles`
    WHERE `swfiles`.`fileid` = 4127;
    # Specify the fileid above from the first query-------------------------------------------------------------------------

    Files are located in folder ..\__swift\files. Each file is a ZIP file, although it lacks a filename extension.

Share This Page