Function to get the display value of a property in submission, if elementId is provided propertyName will be ignored
const result = submissionService.getElementSubmissionValue({
propertyName: 'search',
submission: {
search: 'Entered By User',
},
formElements: [
{
id: 'd4135b47-9004-4d75-aeb3-d2f6232da111',
name: 'search',
type: 'text',
label: 'Search',
readOnly: false,
required: false,
conditionallyShow: false,
requiresAllConditionallyShowPredicates: false,
isElementLookup: false,
isDataLookup: false,
},
],
formatDate: (value) => new Date(value).toDateString(),
formatDateTime: (value) => new Date(value).toString(),
formatTime: (value) => new Date(value).toTimeString(),
formatNumber: (value) => Number(value).toString(),
formatCurrency: (value) => Number(value).toFixed(2),
})
Function to get the display value of a property in submission, if elementId is provided propertyName will be ignored
Example