<#-- -- Get the field from a given code -- @param entry the entry -- @param fieldCode the code -- @return the field --> <#function getFieldByCode entry fieldCode> <#if entry.fields?? && entry.fields?has_content> <#list entry.fields as field> <#if field?? && field.code?? && field.code == fieldCode> <#return field> <#-- -- Build the entry name -- @param entry the entry -- @param entry_iteration_number the iteration number -- @return the name --> <#function buildEntryName entry entry_iteration_number='' > <#assign name = 'attribute' + entry.idEntry> <#if entry_iteration_number?? && entry_iteration_number?has_content && entry_iteration_number gt 0> <#assign name = 'nIt' + entry_iteration_number + '_attribute' + entry.idEntry> <#return name /> <#-- -- Get the response containing the field with the given code -- @param responses the list of responses -- @param the fieldCode the code -- @return the response --> <#function getResponseContainingTheFieldWithCode responses fieldCode> <#if responses??> <#list responses as response> <#if response.field?? && response.field.code?? && response.field.code == fieldCode > <#return response />