You can utilize functions to set values in your appRules project.  appRules includes several internal functions.  In addition, you can define your own functions defined in Visual Studio (see Using Conditions in appRules Projects).


Internal Functions

appRules includes several internal functions that you can use to set field values or to perform or other actions.  Internal functions are built into the system and do not require any code to use them.

For example, to set a value on the property grid using an internal function, select InternalFunction and then click on the button to select the function and enter function arguments if required.



Below are the available internal functions:


Function Name Description
GetValueFromDelimitedString   Gets a value from a string delimited by a single character using 0-origin index
ConcatenateStrings Concatenates strings.  
GetEmptyString Gets an empty string  
StringInsert Inserts a string at a specified index position in the source string (0 origin)  
StringPadLeft Pads a string on the left with a specified character  
StringPadRight   Pads a string on the right with a specified character
StringReplace Replaces all occurrences of an old string value with new string value.  
StringReplaceWithEmptyString Replaces all occurrences of an old string value with an empty string value  
StringToLower Converts a string to lowercase  
StringToUpper Converts a string to UPPERCASE  
StringFirstLetterToUpper   Converts the first letter of a string to UPPERCASE
StringRemove Removes characters in a string starting an index position (0 origin)  
StringTrimAll Removes all whitespace from a string  
StringTrim Removes a specified character from a string  
StringTrimEnd Removes all trailing occurrences of a specified character from a string  
StringTrimStart Removes all leading occurrences of a specified character from a string  
StringSubstring Gets a substring from a string starting at an index position (0 origin)  
StringSubstringOfLength Gets a substring of a specified length from a string starting at an index position (0 origin)  
StringRegex Within the source input string, replaces strings that match a regular expression pattern with a specified replacement string.  
GetYearWeekNumber Gets the number of the week in the year  
GetDateToday Gets today's date  
GetDateYesterday Gets yesterday's date  
GetDateTomorrow Gets tomorrow's date  
GetDateThisDayNextYear Gets this day next year (date)  
GetDateThisDayLastYear Gets this day last year (date)  
GetDateThisDayNextMonth Gets this day next month  
GetDateThisDayLastMonth Gets this day last month  
GetDateThisYearStart Gets this year's start date  
GetDateThisYearEnd Gets this year's end date  
GetDateThisMonthStart Gets this month's start date  
GetDateThisMonthEnd Gets this month's end date  
GetDateThisDayNextWeek Gets this day next week  
GetDateThisDayLastWeek Gets this day last week  
GetDateTimeNow Gets the current Date/Time  
GetYearFromDate Gets the Year (integer) from the date  
GetMonthFromDate Gets the Month (integer) from the date
GetDayFromDate Gets the Day (integer) from the date“  
SetTimeForDateTime Uses the hours and minutes specified for a date to set the time for the DateTime value  
GetNumberOfDaysBetweenDates Calculates the integer number of days between two dates  
GetNumberOfHoursBetweenDateTimes Calculates the number of hours between two date/time values  
AddDaysToDate Adds (or subtracts) the specified number of days to a date  
AddMonthsToDate Adds (or subtracts) the specified number of months to a date  
AddYearsToDate Adds (or subtracts) the specified number of years to a date  
GetUniqueKey Gets an RNGCryptoServiceProvider-based unique key  
GetGuidKey Gets a GUID-base unique key  
GetTimeStampKey Gets a TimeStamp key