Give us feedback
client-utilities
Reactive icon

Client Utilities

Stable version 1.0.5 (Compatible with OutSystems 11)
Uploaded on 27 Apr (6 days ago) by 
5.0
 (7 ratings)
client-utilities

Client Utilities

Documentation
1.0.5

The Client Utilities Forge Component will be regularly updated with new utilities and functions, following the suggestions and requests we receive from numerous friends and from the Outsystems Community members, so come back from time to time and check what's new. 

All you need to do is drag an drop one of the avalable client actions on screen of client actions, set the required input parameters, and handle the output in any way needed.

The set of utilities and functions available are grouped according to their purpose, in the following sections: 

  • Date
    • DayOfTheYear
      • Returns the number of the day of the year for a given date
      • Input :
        • Date - date to check
      • Output :
        • Day - the day of the year related to the date
    • IsLeapYear
      • Returns a boolean value, regarding a given year being a leap year or not
      • Input :
        • Year - year to check
      • Output :
        • IsLeapYear - returns True if the year is a leap year
    • LastDayOfMonth
      • Returns the last day of a month by a given date
      • Input :
        • Date - date to check
      • Output :
        • LastDay - last day of the month, in Date format
    • MonthsList
      • Returns a list of months with localization
      • Input :
        • Language - language to use (en, pt, fr, de, es); defaults to 'en'
      • Output :
        • Months - list of months with the month number as Value and the month name as Label (ideal to use as a Dropdown source list)
    • Quarter
      • Returns the quarter of a given date
      • Input :
        • Date - date to check
      • Output :
        • Quarter - quarter number related to the date
    • QuartersList
      • Returns a list of quarters with localization
      • Input :
        • Language - language to use (en, pt, fr, de, es); defaults to 'en'
      • Output :
        • Quarters - list of quarters with the quarter number as Value and the quarter name as Label (ideal to use as a Dropdown source list)
    • StartOfPeriod
      • Returns a date-time of the start of the given date and period
      • Input :
        • DateTime - date-time to check
        • Period - the period to handle (year, month, week, day, hour, minute)
      • Output :
        • StartOfPeriod - the start of the period in date-time format
    • TimezoneAbbr
      • Returns the abbreviated time zone name or similar information
      • Input :
        • (none)
      • Output :
        • TimezoneAbbr - the abbreviated time zone name
    • TimezoneOffset
      • Returns time zone as hour and minute offset from UTC (e.g. +0900)
      • Input :
        • (none) 
      • Output :
        • Offset - the timezone offset from UTC in text format
    • TotalDaysInMonth
      • Returns the total amount of days in the month (considering leap years)
      • Input :
        • Year - year to check
        • Month - month number to check
      • Output :
        • Days - number of days in the month
    • TotalDaysInYear
      • Returns the amount of days in the year following the gregorian calendar and leap years
      • Input :
        • Year - year to check
      • Output :
        • Days - number of days in the year
    • WeekOfTheYear
      • Returns the week of the year based on given date
      • Input :
        • Date - date to check
      • Output :
        • Week - number of the week in the year
    • WeekOfTheYear_ISO8601
      • Returns the week of the year based on given date, following ISO 8601  
      • Input :
        • Date - date to check
        • FirstDayOfTheWeek - first day of the week (0 - Sunday; 1 - Monday; 2 - Tuesday; 3 - Wednesday; 4 - Thursday; 5 - Friday; 6 - Saturday); defaults to 0
      • Output :
        • Week - number of the week in the year
    • YearsListBetweenInterval
      • Returns a list of years between an given interval
      • Input :
        • YearFrom - initial year
        • YearTo - final year
      • Output :
        • Years - list of years with the year number as Value and the year name as Label (ideal to use as a Dropdown source list)


  • Random
    • RandomBit
      • Returns a random Bit number (0 or 1)
      • Input :
        • (none) 
      • Output :
        • Bit - random bit value generated
    • RandomBoolean
      • Returns a random Boolean value (True or False)
      • Input :
        • (none) 
      • Output :
        • Boolean - random boolean generated
    • RandomChoice
      • Returns a random element from a list of text values
      • Input :
        • Choices - list of text choices to choose from
      • Output :
        • SelectedChoice - random choice selected
    • RandomGUID
      • Returns a random GUID
      • Input :
        • (none) 
      • Output :
        • GUID - random GUID generated
    • RandomHex
      • Returns a random Hexadecimal value of a given size
      • Useful when you need to get a random color hex code 
      • Input :
        • Size - size of the random HEX to generate
      • Output :
        • Hex - random HEX generated
    • RandomIntFromInterval
      • Returns a random Integer value between 2 values
      • Input :
        • Min - minimum integer value
        • Max - maximum integer value
      • Output :
        • Integer - random integer generated
    • RandomSign
      • Returns a random sign (-1 or 1)
      • Input :
        • (none) 
      • Output :
        • Sign - random sign generated
    • RandomString
      • Returns a random string from a given dictionary of chars and with a given length
      • Input :
        • Length - length of the string to generate
        • Dictionary - dictionary of chars to generate the random string from (defaults to '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
      • Output :
        • String - random string generated


  • String
    • CamelCase
      • Converts a string to camelCase text
      • Input :
        • Str - string to convert
      • Output :
        • CamelCase - converted string
    • EndsWith
      • Checks if a string ends with specified suffix
      • Input :
        • Str - string to check
        • Suffix - suffix to check
      • Output :
        • EndsWith - returns True if the string ends with the suffix
    • EscapeHTML
      • Escapes a string for insertion into HTML
      • Input :
        • Str - string yo escape
      • Output :
        • StrHTML - HTML escaped string
    • Hyphenate
      • Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case
      • Input :
        • Str - string to hyphenate
      • Output :
        • Hyphenate - hyphenated string
    • Insert
      • Inserts a substring in a string at a given index
      • Input :
        • Str - main string to be manipulated
        • InsertStr - string to insert
        • Index - zero-based index position where to insert the parameter InsertStr
      • Output :
        • FinalString - final string
    • Join
      • Joins a list of strings separated by a given character
      • Input :
        • StringList - llist of strings to join
        • Separator - separator char(s) to append to the strings list (defaults to ' ')
      • Output :
        • String - joined string
    • PascalCase
      • Converts a string to PascalCase text
      • Input :
        • Str - string to convert
      • Output :
        • PascalCase - converted string
    • ProperCase
      • Converts a string to Proper Case text (first letter of each word in uppercase)
      • Input :
        • Str - string to convert
      • Output :
        • ProperCase - converted string
    • RemoveNonASCII
      • Removes non-printable ASCII chars from a string
      • Input :
        • Str - string to clean
      • Output :
        • CleanStr - cleaned string
    • RemoveNonWord
      • Removes non-word chars from a string
      • Input :
        • Str - string to clean
      • Output :
        • CleanStr - cleaned string
    • Repeat
      • Repeats a string a number of times according to a given parameter
      • Input :
        • Str - string to repeat
        • Separator - separator to use while repeating the string (defaults to ' ')
        • Repeats - number of repeats of the original string
      • Output :
        • FinalString - final string
    • ReplaceAccents
      • Replaces all accented chars with regular ones
      • Input :
        • Str - string to clean
      • Output :
        • CleanStr - cleaned string
    • SentenceCase
      • Uppercases the first char of each sentence and lowercases other chars
      • Input :
        • Str - string to convert
      • Output :
        • SentenceCase - converted string
    • Split
      • Splits a string by a given separator char into its substrings
      • Input :
        • Str - string to split
        • Separator - separator to use while splitting the strings
      • Output :
        • StriingList - list of the splitted strings
    • StartsWith
      • Checks if string starts with specified prefix
      • Input :
        • Str - string to check
        • Prefix - prefix to check
      • Output :
        • StartsWith - returns True if the string starts with the prefix
    • StripHTMLTags
      • Removes HTML tags from a string
      • Input :
        • Str - string to clean
      • Output :
        • FinalString - cleaned string
    • TitleCase
      • Converts a string to Title Case text (first letter of each word in uppercase)
      • Input :
        • Str - string to convert
      • Output :
        • TitleCase - converted string
    • UnCamelCase
      • Reverts a Camel Case conversion, by adding a delimiter between camelCase text
      • Input :
        • Str - string to convert
        • Delimiter - delimiter to use to split camel case words (defaults to ' ')
      • Output :
        • UnCamelCase - converted string
    • Underscore
      • Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case
      • Input :
        • Str - string to convert
      • Output :
        • Undersore - converted string
    • UnEscapeHTML
      • Unescapes HTML special chars from a string
      • Input :
        • Str - string to clean
      • Output :
        • FinalString - cleaned string
    • UnHyphenate
      • Replaces hyphens with spaces. (only hyphens between word chars)
      • Input :
        • Str - string to clean
      • Output :
        • FinalString - cleaned string


The Demo allows you to view detailed information about each widget, how to use it and a brief preview / demo of it.


1.0.4

The Client Utilities Forge Component was updated to version 1.0.4.

On this new version, you will find:

  • Fix for an Architecture Dashboard Code Pattern violation
  • Fix for a bug detected on the Hyphenate function, which was not working as expected
  • A Demo package is now included on the Forge Component


No changes were made to the remaining Functions available.


1.0.3

The Client Utilities Forge Component will be regularly updated with new utilities and functions, following the suggestions and requests we receive from numerous friends and from the Outsystems Community members, so come back from time to time and check what's new. 

The set of utilities and functions available are grouped according to their purpose, in the following sections: 

  • Date
    • DayOfTheYear
      • Returns the number of the day of the year for a given date
    • IsLeapYear
      • Returns a boolean value, regarding a given year being a leap year or not
    • LastDayOfMonth
      • Returns the last day of a month by a given date
    • MonthsList
      • Returns a list of months with localization
    • Quarter
      • Returns the quarter of a given date
    • QuartersList
      • Returns a list of quarters with localization
    • StartOfPeriod
      • Returns a date-time of the start of the given date and period
    • TimezoneAbbr
      • Returns the abbreviated time zone name or similar information
    • TimezoneOffset
      • Returns time zone as hour and minute offset from UTC (e.g. +0900)
    • TotalDaysInMonth
      • Returns the total amount of days in the month (considering leap years)
    • TotalDaysInYear
      • Returns the amount of days in the year following the gregorian calendar and leap years
    • WeekOfTheYear
      • Returns the week of the year based on given date
    • WeekOfTheYear_ISO8601
      • Returns the week of the year based on given date, following ISO 8601  
    • YearsListBetweenInterval
      • Returns a list of years between an given interval
  • Random
    • RandomBit
      • Returns a random Bit number (0 or 1)
    • RandomBoolean
      • Returns a random Boolean value (True or False)
    • RandomChoice
      • Returns a random element from a list of text values
    • RandomGUID
      • Returns a random GUID
    • RandomHex
      • Returns a random Hexadecimal value of a given size
      • Useful when you need to get a random color hex code 
    • RandomIntFromInterval
      • Returns a random Integer value between 2 values
    • RandomSign
      • Returns a random sign (-1 or 1)
    • RandomString
      • Returns a random string from a given dictionary of chars and with a given length
  • String
    • CamelCase
      • Converts a string to camelCase text
    • EndsWith
      • Checks if a string ends with specified suffix
    • EscapeHTML
      • Escapes a string for insertion into HTML
    • Hyphenate
      • Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case
    • Insert
      • Inserts a substring in a string at a given index
    • Join
      • Joins a list of strings separated by a given character
    • PascalCase
      • Converts a string to PascalCase text
    • ProperCase
      • Converts a string to Proper Case text (first letter of each word in uppercase)
    • RemoveNonASCII
      • Removes non-printable ASCII chars from a string
    • RemoveNonWord
      • Removes non-word chars from a string
    • Repeat
      • Repeats a string a number of times according to a given parameter
    • ReplaceAccents
      • Replaces all accented chars with regular ones
    • SentenceCase
      • Uppercases the first char of each sentence and lowercases other chars
    • Split
      • Splits a string by a given separator char into its substrings
    • StartsWith
      • Checks if string starts with specified prefix
    • StripHTMLTags
      • Removes HTML tags from a string
    • TitleCase
      • Converts a string to Title Case text (first letter of each word in uppercase)
    • UnCamelCase
      • Reverts a Camel Case conversion, by adding a delimiter between camelCase text
    • Underscore
      • Replaces spaces with underscores, split camelCase text, remove non-word chars, remove accents and convert to lower case
    • UnEscapeHTML
      • Unescapes HTML special chars from a string
    • UnHyphenate
      • Replaces hyphens with spaces. (only hyphens between word chars)


The Demo allows you to view detailed information about each widget, how to use it and a brief preview / demo of it.