@oneblink/sdk-core
    Preparing search index...

    Function getElementSubmissionValue

    • 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),
      })

      Parameters

      • options: {
            formElements: FormElement[];
            propertyName: string;
            useSubmissionValue?: boolean;
        } & ReplaceInjectablesFormatters & {
            excludeNestedElements?: boolean;
            submission: { [name: string]: unknown };
            task: Task | undefined;
            taskGroup: TaskGroup | undefined;
            taskGroupInstance: TaskGroupInstance | undefined;
            userProfile: UserProfile | undefined;
        }
        • formElements: FormElement[]
        • propertyName: string
        • OptionaluseSubmissionValue?: boolean
        • OptionalexcludeNestedElements?: boolean

          Determine if only root level elements should be replaced.

          false will replace "{ELEMENT:Parent_Name}" and "{ELEMENT:Children|Name}".

          true will replace "{ELEMENT:Parent_Name}" but will NOT replace {ELEMENT:Children|Name}.

        • submission: { [name: string]: unknown }
        • task: Task | undefined
        • taskGroup: TaskGroup | undefined
        • taskGroupInstance: TaskGroupInstance | undefined
        • userProfile: UserProfile | undefined

      Returns { element: FormElement | undefined; value: unknown } | undefined

    • 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),
      })

      Parameters

      • options: { elementId: string; formElements: FormElement[]; useSubmissionValue?: boolean } & ReplaceInjectablesFormatters & {
            excludeNestedElements?: boolean;
            submission: { [name: string]: unknown };
            task: Task | undefined;
            taskGroup: TaskGroup | undefined;
            taskGroupInstance: TaskGroupInstance | undefined;
            userProfile: UserProfile | undefined;
        }
        • elementId: string
        • formElements: FormElement[]
        • OptionaluseSubmissionValue?: boolean
        • OptionalexcludeNestedElements?: boolean

          Determine if only root level elements should be replaced.

          false will replace "{ELEMENT:Parent_Name}" and "{ELEMENT:Children|Name}".

          true will replace "{ELEMENT:Parent_Name}" but will NOT replace {ELEMENT:Children|Name}.

        • submission: { [name: string]: unknown }
        • task: Task | undefined
        • taskGroup: TaskGroup | undefined
        • taskGroupInstance: TaskGroupInstance | undefined
        • userProfile: UserProfile | undefined

      Returns { element: FormElement | undefined; value: unknown } | undefined