Manual Reference Source Test
public class | source

FlowInput

Extends:

FlowInputModel → FlowInput

Helper class representing a flow input object. Required values include:

  • id
  • title
  • question_type
  • style
  • choice_list

Example:

let facilityTypeInput = new FlowInput({
 id: 7175,
 storage_attribute: "some_title",
 title: "Facility Type",
 body: null,
 question_type: "single_choice",
 style: "radio_buttons",
 required: false,
 validation_expression: null,
 validation_details: null,
 instructions: null,
 choice_list: [
     { id: 4495, body: "Clinic/Outpatient Facility" },
     { id: 4496, body: "Dedicated Research Facility" },
     { id: 4497, body: "Hospital" },
     { id: 4498, body: "Long-Term Care Facility" },
     { id: 4499, body: "Network" }
 ],
 locked: null
});
let myInput = new FlowInput({
 id: 9433,
 storage_attribute: "expiration",
 title: "License Expiration Date",
 body: null,
 question_type: "date",
 style: "calendar",
 required: true,
 validation_expression: null,
 validation_details: {
     min: "current"
 },
 instructions: null,
 choice_list: [],
 locked: null
});
let myInput = new FlowInput({
 id: 9766,
 storage_attribute: "dyn_curriculum_vitae_effective_date",
 title: "CV Effective Date",
 body: null,
 question_type: "date",
 style: "calendar",
 required: true,
 validation_expression: null,
 validation_details: {
     max: "current",
     min: {
         value: "current",
         subtract: { year: 2 },
         add: null
     }
 },
 instructions: null,
 choice_list: [],
 locked: null
});

Method Summary

Public Methods
public

Find a choice object given a string

public

Get input data belonging to this flow input

Inherited Summary

From class FlowInputModel
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

Public Methods

public findChoiceByCode(value: String): Object source

Find a choice object given a string

Params:

NameTypeAttributeDescription
value String

The item in which to search

Return:

Object

Example:

facilityTypeInput.findChoiceByCode('Network');
// Should return Choice { id: 4499, code: "Network" }

public getData(): Promise source

Get input data belonging to this flow input

Return:

Promise

A promise with the resulting data

Example:

facilityTypeInput.getData().then(data => console.log(data));