mod_address

Combine the components of an address into a readable string of text.

syntax: $modify(value, mod_address, p1, p2, p3, p4)$

value: any text value representing address line 1

modifier: mod_address

p1: any text value representing address line 2

p2: any text value representing city

p3: any text value representing state

p4: any text value representing zip

mod_boolean

Provides a simple way to resolve a text value to a boolean value of true or false.  True values include true, ok, yes.

syntax: $modify(value, mod_boolean)$

value: any string of text or boolean value

modifier: mod_boolean

mod_compare

Compare two values with the result indicating if the value 1 is less, equal, or greater than value 2.  Optional parameters 2, 3, and 4 can be supplied to override the value that is returned.  This modifier is typically using with GizmoUtilityGizmo to set the Assert State of the Dashboard based on the comparison of two values.  

syntax: $modify(value, mod_compare, p1, p2, p3, p4)$

value: any text value 

modifier: mod_compare

p1: any text value to compare to value

p2: Optional.  Override the default value of "Less" that is returned.

p3: Optional.  Override the default value of "Equal" that is returned.

p4: Optional.  Override the default value of "Greater" that is returned.

mod_currency

Applies currency formatting to the supplied value.  

syntax: $modify(value, mod_currency)$

value: any numeric value

modifier: mod_currency

mod_date

Use to modify a string of text that represents a date.  For example, you might need to change the order in which the date components are displayed or possibly convert the date to a timestamp.

syntax: $modify(value, mod_date, p1, p2)$

value: any text value representing a date

modifier: mod_date

p1: an integer value indicating the type of conversion you need.  Valid types include the following.

  • 0 - Date
  • 1 - Time
  • 2 - Timestamp
  • 6 - Duration
  • 10 - Day
  • 11 - Month Year
  • 12 - Year
  • 13 - Day of Week Month
  • 27 - Time in Milliseconds

p2: a text pattern indicating the how you need the date formatted.  See SimpleDateFormat for examples.

example: $modify(01-01-2018,mod_date,0,yyyy-MM-dd)$

mod_decimal

Used to apply decimal formatting.

syntax: $modify(value, mod_decimal, p1, p2, p3)$

value: any numeric value

modifier: mod_decimal

p1: the maximum number of digits to the right of the decimal point

p2: the minimum number of digits to the left of the decimal point

p3: "true" if you want comma grouping of numbers that are left of the decimal (ie. 100,000.001)

mod_equals

Compares the incoming value to any number of values.  If the incoming value equals one of the values then a value of true is returned.  Otherwise, a value of false is returned if there is not a match.

syntax: $modify(value, mod_equals, p1, p2, p3, p4, ect.)$

value: any value 

modifier: mod_equals

p1: The first value to compare to the incoming value

p2: Optional.  The second value to compare to the incoming value

p3: Optional.  The third value to compare to the incoming value

p4: Optional.  The fourth value to compare to the incoming value

Note: You can include as many comma separated values as needed for comparison.

mod_measure

Converts a source measurement into a target measurement such as convert centimeters to inches.

syntax: $modify(value, mod_measure, p1, p2)$

value: any numeric value

modifier: mod_measure

p1: a one or two character measurement code

p2: a one or two character measurement code 

  • px - pixels
  • pt - points
  • km - kilometers
  • m - meters
  • cm - centimeters
  • mm - millimeters
  • um - micrometers
  • nm - nanometers
  • pm - picometers
  • mi - miles
  • yd - yards
  • ft - feet
  • in - inches

mod_measure_format

Modifies a measure by applying a formatting pattern.  For instance, you would use this modifier to convert the number 15 to 1 ft 3 in or something such as that.

syntax: $modify(value, mod_measure_format, p1, p2)$

value: any numeric value

modifier: mod_measure_format

p1: formatting pattern to apply to the measurement.  An initial list of formatting patterns is listed below, but just know other formatting patterns are possible if needed.

  • k/K kilometers
  • m/M meters
  • c/C centimeters
  • r/R millimeters
  • u/U micrometers
  • n/N nanometers
  • p/P picometers
  • l/L miles
  • y/Y yards
  • f/F feet
  • i/I inches
  • x/X pixels
  • t/T points

Formatting patterns can be combined in logical combinations as needed.  Just know that the lower case character indicates the units that you want to display and the upper case characters(s) dictate the description that will be applied.  For example, you could modify a value of 100 inches to display as follows

  • iI - 100"
  • iII - 100in
  • i III - 100 ins
  • i IIII - 100 inches
  • fF iI - 8' 4"

p2: optional parameter that identifies the units of our measurement.  The default value is "in".

  • px - pixels
  • pt - points
  • km - kilometers
  • m - meters
  • cm - centimeters
  • mm - millimeters
  • um - micrometers
  • nm - nanometers
  • pm - picometers
  • mi - miles
  • yd - yards
  • ft - feet
  • in - inches

mod_phone

Modifies a phone number by using a formatter to format the number.  The default configurationis for domestic phone numbers, but if you are expecting international phone numbers you can pass an additional boolean parameter of true to enable international formatting.

syntax: $modify(value, mod_phone, p1)$

value: any numeric value representing a phone number

modifier: mod_phone

p1: optional parameter when set to true will apply international formatting.

mod_time

Modifies time value by changing it into a consistent time format.  The incoming value can be a time String such as hh:mm:ss or a millisecond value  that needs to be presented as a time String.

syntax: $modify(value, mod_time)$

value: any string representing time

modifier: mod_time

mod_timestamp

Modifies a date/time value by changing it into a consistent timestamp format.  The incoming value can be any valid date, time or date/time format.

syntax: $modify(value, mod_timestamp)$

value: any string representing a date, time or both.

modifier: mod_timestamp

mod_url

Converts an Ittrium encoded key into a self relative URL path.  We typically use this when we have integrated a dashboard application with the CMS and need to build a URL through a dashboard application that can reach a CMS resource such as a page or a photo.

syntax: $modify(value, mod_url, p1)$

value: any encoded key 

modifier: mod_url

p1: a substitution URL to use if the target resource identified through the encoded key that is supplied cannot be located.

mod_url_format

Provides a simple way to convert a URL to a relative URL.  Initially used to convert per site URLs that are produced through Google into relative URLs so that we can avoid unnecessary redirects for sites where we are forcing everyone through SSL.

syntax: $modify(value, mod_url_format)$

value: any fully qualified URL the points to an Ittrium resource such as page or photo

modifier: mod_url_format

mod_weight

Converts a source weight into a target weight such as converting hectograms to pounds.

syntax: $modify(value, mod_measure, p1, p2)$

value: any numeric value

modifier: mod_measure

p1: a one or two character weight code

p2: a one or two character weight code 

  • kg - kilograms
  • hg - hectograms
  • g - grams
  • mg - milligrams
  • lb - pounds
  • oz - ounces

mod_weight_format

Modifies a weight by applying a formatting pattern.  For instance, you would use this modifier to convert the weight of 100 pounds to 100 lbs

syntax: $modify(value, mod_weight_format, p1,p2)$

value: any numeric value

modifier: mod_weight_format

p1: formatting pattern to apply to the weight.  An initial list of formatting patterns is listed below, but just know other formatting patterns are possible if needed.

  • o/O - kilograms
  • h/H - hectograms (one tenth of KG, 100G)
  • g/G - grams
  • a/A - milligrams
  • b/B - pounds (lb)
  • z/Z - ounces (oz)
Remember that you can combine formatters in interesting ways so if you need to display a weight as pounds and ounces you could try one of the following.
 
  • bB zZ
  • b BBBB zZZZZ

p2: indicates what kind of weight measurement we are dealing with.

  • kg - kilograms
  • hg - hectograms
  • g - grams
  • mg - milligrams
  • lb - pounds
  • oz - ounces

A modifier is a simple function that is used to modify (change a value from one thing to another) that can also format the display.  The pattern for the modify function is always the same and modifier functions can be nested as needed so that you can convert data from one format to another and then also alter the display.  For example, the following illustrates how you could convert data that is stored in centimeters to inches and the format the display in feet and inches.

$modify(modify(100,mod_measure,cm,in),mod_measure_format,fF iI,in)$

You'll also find a simple tool that you can use to familiarize yourself the the various modifier options.

Title

Message