Skip to content

Instantly share code, notes, and snippets.

@jverweijL
Created November 23, 2018 16:09
Show Gist options
  • Select an option

  • Save jverweijL/11372093bf2280f6a2a68f6675923976 to your computer and use it in GitHub Desktop.

Select an option

Save jverweijL/11372093bf2280f6a2a68f6675923976 to your computer and use it in GitHub Desktop.
Example how you can get an overview of data filled into a form for a specific user.
<#assign companyId = themeDisplay.getCompanyId()/>
<#assign groupId = themeDisplay.getScopeGroupId()/>
<#assign userId = themeDisplay.getRealUserId() />
<#assign locale = themeDisplay.getLocale() />
<#assign ddlService = serviceLocator.findService('com.liferay.dynamic.data.lists.service.DDLRecordLocalService') />
${companyId}
${groupId}
${themeDisplay.getRealUserId()}
${locale}
<#assign ddlLists = ddlService.getDDLRecords( 0, 1000)/>
<#list ddlLists as ddlList>
<#if ddlList.getUserId() == userId && ddlList.getGroupId() == groupId>
<#assign ddmFormFieldValues = ddlList.getDDMFormFieldValues("ChangingAndImproving")/>
<#list ddmFormFieldValues as ddmFormFieldValue>
${ddmFormFieldValue.getName()}
</#list>
</#if>
</#list>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment