Legacy Knowledge Base
Published Jul. 2, 2025

Form's fieldReference name in the ddmforminstancereport entity

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • The modified value of the FieldReference field of forms should also be updated in the database ddmforminstancereport entity once the user modified on form's UI.
    Steps to reproduce:
    1) Create a form
    2) Add a 'Text' field
    3) Navigate to the 'Advanced' tab of this field
    4) Change text in the 'FieldReference' field
    5) Publish form
    Observed Behavior: In the database (ddmforminstancereport), the default string is still present, although, a modified value can be seen on UI in the field of FieldReference.

Environment

  • Liferay DXP 7.4 Update 1

Resolution

  • The observed behavior is the intended behavior of the Liferay DXP. 
  • The database was designed to meet the needs of DXP and could not be modified here.
    If the field reference is added there, then every time a field reference changes, the rows of this table must be updated so that the data does not become obsolete.
    • The field name is immutable and it was created for this kind of use case where the user needed a constant identifier. Please keep in mind that this table is also an auxiliary table that helps to plot the graphs inside Forms.

Additional Information

  • If the user wants to leverage the data inside of it, here’s a workaround that should work for them: firstly search for the field by its reference, capture its name, then use it to search the data inside this table.
    • If users have access to their DDMForm they can try to use the getDDMFormFieldsReferencesMap method. This method returns a map with the FieldReference as the key. Then, it is possible to access the Field ID as follows:
      Map<String, DDMFormField> ddmFormFields = ddmForm.getDDMFormFieldsReferencesMap(true);
      DDMFormField ddmFormField = ddmFormFields.get("FirstName");
      String fieldID = ddmFormField.getName();

      This way users can use the fieldID instead to get data from the posted form

    • Therefore, to sum up, users are able to create a groovy script that would allow them to retrieve data from the table.

  • We have a channel called "Global Service Team" in case of further assistance regarding any script, customization, and development.
Did this article resolve your issue ?

Legacy Knowledge Base