Formula | Format | Definition | Example |
dataPoint() | dataPoint( attrName.dataPoint ) | The dataPoint() formula examines the same data class (eg: members, crews). This allows you to break out an additional data point value into its own badge-able attribute. The attrName needs to refer to an attribute definition with "addl data value points. | dataPoint ( StormRole.Qualified ) |
or() | or ( attr1, attr2, attr3.dataPoint, ... ) | The or() formula examines other attributes at the same data class. The formula will check the value of each argument and return the first one with a value. This is a way to compile multiple potential attributes into a single attribute. | or ( PrimaryClass.WrenchTurner, StormRole.Qualified ) |
summarize() | summarize( attrName ) or summarize( attrName.dataPoint ) | The summarize() formula looks at the data one level down and creates a summary of counts on the parent. The resulting value is NOT usable as a badge on its own. Rather, it is a pre-req for the count() function. | summarize ( StormRole ) & summarize ( StormRole.Qualified ) |
count() | count( summarizeAttr.value ) | The count() formula looks at a "summarize" attribute at the same data level. It returns the numeric count for the specified value. In the examples, the "Summary" attribute would be a pre-req. | count ( StormRoleSummary.Patroller ) & count ( StormRoleSummary.Lead Lineman ) & count ( QualifiedSummary.Yes ) |
sum() | sum( attrName ) or sum( attrName.dataPoint ) | The sum() formula works like summarize(), in that in looks at the data one level down and creates a value on the parent. The attribute being summed needs to have a numeric value itself. | sum ( StormRole.Qualified ) & sum ( NumQualified ) |
startOf() | startOf( attrName ) or startOf( attrName, date format ) | The startOf() formula finds the start date/time (in relation to PIT) of the specified attribute at the member or crew level. The date format argument is optional and a default format will be returned if none is supplied. The "Status" keyword may be used in place of attrName and will return the start time of a member schedule record (PIT based). "Status" keyword logic will only be triggered at the members level. However, startOf() will still function at the crew level if a user defined attribute exists named "Status". |
startOf ( Supervisor ) & startOf ( Supervisor, m/d/yy HH:MM:ss ) |
endOf() | endOf( attrName ) or endOf( attrName, date format ) | The endOf() formula finds the end date/time (in relation to PIT) of the specified attribute at the member or crew level. The date format argument is optional and a default format will be returned if none is supplied. The "Status" keyword may be used in place of attrName and will return the end time of a member schedule record (PIT based). "Status" keyword logic will only be triggered at the members level. However, endOf() will still function at the crew level if a user defined attribute exists named "Status". |
endOf ( Supervisor ) & endOf ( Supervisor, m/d/yy HH:MM:ss ) & endOf ( Supervisor, m/d/yy HH:MM:ss ) |
findMember() | findMember( attr1.value, attr2.None, attr3, ... ) | The findMember() formula finds one Member (based on sort order) within a crew matching the attribute criteria. "None" is a supported value, and not supplying a value on an attribute will function as if "None" was supplied. |
findMember ( StormRole.Patroller, Supervisor.Yes ) & findMember ( Leader.Yes ) |
memberAttr() | memberAttr( crewAttr.memberAttr ) | The example formula returns the value of the Phone1 attribute for the member found by the findMember() formula in place on the Leader crew attribute. | memberAttr ( Leader.Phone1 ) |
add() | add( attr1, attr2, attr3, ... ) | The add() formula will sum the numeric values of two or more attributes at the same level (member, crew, group). Also supports literal numeric values as 2nd+ argument. | add( NumWorking, NumException ) |
diff() | diff( attr1, attr2 ) | The diff() (aka subtract) formula will find the difference between two numeric attributes at the same level (member, crew, group). The 2nd argument can be a literal numeric value. | diff( NumMembers, NumException ) |
multiply() | multiply( attr1, attr2, attr3, ... ) | The multiply() formula will multiply the numeric values of two or more attributes at the same level (member, crew, group). Results are always rounded to two decimal places. Also supports literal numeric values as 2nd+ argument. | multiply( NumMembers, 2 ) & multiply( NumTrucks, DailyFuel ) |
divide() | divide( attr1, attr2, round ) | The divide() formula will divide two numeric attributes at the same level (member, crew, group). The 2nd argument can be a literal numeric value. The 3rd argument specifies how many decimal places to round to -- this is optional and defaults to 2. Valid values are from 0 to 10. | divide( NumMembers, NumVehicles ) & divide( NumTickets, 8 ) |
equals() | equals( attr1, attr2, ... ) | The equals() formula will indicate if the values of two or more attributes are equal at the same level (member, crew, group). Supports numeric and non-numeric attribute values. Also supports literal numeric values as 2nd+ argument. | equals( HomeArea, WorkingArea ) & equals( NumWorking, 0 ) |
lessThan() | lessThan( attr1, attr2 ) | This formula requires two arguments, and will return Y or N when evaluated. The 2nd argument can be a literal numeric value. | lessThan( RoomsAvailable, RoomsNeeded ) |
greaterThan() | greaterThan( attr1, attr2 ) | This formula requires two arguments, and will return Y or N when evaluated. The 2nd argument can be a literal numeric value. | greaterThan( RoomsAvailable, RoomsNeeded ) |
lessThanOrEqual() | lessThanOrEqual( attr1, attr2 ) | This formula requires two arguments, and will return Y or N when evaluated. The 2nd argument can be a literal numeric value. | lessThanOrEqual( NumCrews, 1 ) |
greaterThanOrEqual() | greaterThanOrEqual( attr1, attr2 ) | This formula requires two arguments, and will return Y or N when evaluated. The 2nd argument can be a literal numeric value. | greaterThanOrEqual( NumCrews, 1 ) |
concat() | concat( attr1, attr2, ... , separator ) | The concat() formula can be used to combine two attributes into a single badge, to save on real-estate. The separator is optional, and MUST be the last argument AND a single character in order to be recognized as a separator. | concat ( Email, VehPhone, / ) |
contains() | contains ( attr, pattern1, pattern2, ... ) | The contains() formula will return "Y" or "N" based on finding a string/pattern in the specified attribute at the same level. | contains ( PrimaryClass, Leader, Foreman, Chief ) |
assignCount() | assignCount( targetClass.assignAttr ) | The assignCount() formula can only be used on Resource types (eg Vehicle, Restaurant, WorkOrder). It is used to monitor how many crews or members are currently assigned to each resource instance. The 2nd-part of the argument must refer to a Crew or Member level attribute which itself IS a resource assignment attribute. | assignCount ( crews.BreakfastAssign ) |
assignSummarize() | assignSummarize( targetClass.assignAttr.attrName ) | The assignSummarize() formula can only be used on Resource types (eg Vehicle, Restaurant, WorkOrder). It is used to summarize data using the crews or members who are currently assigned to each resource instance. The 2nd-part of the argument must refer to a Crew or Member level attribute which itself IS a resource assignment attribute. The 3rd-part of the argument must be a Crew or Member attribute (the thing being summarized). |
assignSummarize ( members.HotelAssign.Gender ) |
assignSum() | assignSum( targetClass.assignAttr.attrName ) | The assignSum() formula can only be used on Resource types (eg Vehicle, Restaurant, WorkOrder). It is used to sum (add up) data using the crews or members who are currently assigned to each resource instance. The 2nd-part of the argument must refer to a Crew or Member level attribute which itself IS a resource assignment attribute. The 3rd-part of the argument must be a Crew or Member attribute (the thing being summed), and should have numeric values. |
assignSum ( crews.BreakfastAssign.Company ) & assignSum ( members.HotelAssign.Gender ) |
resourceAttr() | resourceAttr( assignmentAttr.resourceAttr ) | This can be used at the crew or member level. It returns the attribute value for the crew or member's assignment (if any). The first half of the argument must be a crew|member resourceAssign attribute. Any resource attribute can be used as the 2nd part of the argument. |
resourceAttr ( BreakfastAssign.Address ) & resourceAttr ( VehicleAssign.Radio# ) |
resourceSummarize() | resourceSummarize( assignmentAttr.resourceAttr ) | This can be used at the crew or member level. It is used to summarize data using the assigned resources for the crew|member. The first half of the argument must be a crew|member resourceAssign attribute. Any resource attribute can be used as the 2nd part of the argument. | resourceSummarize ( BreakfastAssign.name ) & resourceSummarize ( VehicleAssign.Type ) |
resourceSum() | resourceSum( assignmentAttr.resourceAttr ) | This can be used at the crew or member level. It is used to sum (add up) data using the assigned resources for the crew|member. The first half of the argument must be a crew|member resourceAssign attribute. Any resource attribute can be used as the 2nd part of the argument, but it should have numeric values. | resourceSum ( VehicleAssign.NumSeats ) |
lodgingAttr() | lodgingAttr( attr ) | This can only be used at the member level. It returns the attribute value for the member's current lodging (if any). | lodgingAttr ( name ) |
roomAttr() | roomAttr( attr ) | This can only be used at the member level. It returns the attribute value for the member's current lodging (if any).. | roomAttr ( size ) |
valueFor() | valueFor (attr.key) | This formula is used to extract values from attributes at the same level that contain key/value data pairs from other applications (e.g. sMART). The formula contains a single argument with 2 parts: The first part of the argument is the name of the attribute containing the key/value pairs. The second part of the argument is the key name that you want to collect the value for. |
SMART_locationData.latitude & SMART_locationData.longitude |
hadStatusOf() | hadStatusOf (Status to look for, Status or StatusDesc, Start HH:MM, [Start days from pit], End HH:MM, [End days from pit]) | This formula will return Y if the member had an unmasked Schedule Record that matches the 1st argument and occurred between start days HH:MM and end days HH:MM. If the 2nd argument is Status, the 1st must match the type of Status (Working, Rest, Exception, etc). If the 2nd argument is StatusDesc, the 1st argument must match the Schedule Record event description. Start HH:MM is the starting time of day. [Start days from pit] is an optional argument that specifies the number of days from the current pit day to start from. End HH:MM is the ending time of day. [End days from pit] is an optional argument that specified the number of days from the current pit day to end from. Valid values for the HH:MM arguments are the times between 00:00 (midnight) and 23:59 (11:59 pm). Valid values for the days from pit arguments are -7 (7 days before pit) to 7 (7 days after pit). |
hadStatusOf(Rest, Status, 08:00, 16:00) This returns Y if a member had a Rest status somewhere between 8 am and 4 pm on the current pit day. hadStatusOf(Working - Normal Shift, StatusDesc, 02:00, -1, 12:00, 1) This returns Y if a member worked a normal shift somewhere between 2 am the day before pit and noon the day after pit. |
timeCompare() | timeCompare (attr1, attr2) | This formula returns the difference between Date/Time values in hours, first minus second. Alternatively, PIT may be used as an argument and will evaluate to the current PIT selection. |
timeCompare(ArrivalTime, DepartureTime) |
capacityData | capacityData (RoomTypeName, item) | This formula can only be used on Lodgings (aka Hotels). The first argument must be the name of a RoomType. The second argument must be the word quantity or rate. |
capacityData(Single, quantity) capacityData(Single, rate) capacityData(Double, rate) |
ifMatch() | ifMatch( text-pattern, Attr1m, Attr1u, Attr2m, Attr2u, ... ) | This formula can be used on any target. The first argument must be a simple text pattern, which will be searched for in the subsequent attributes. The attribute names come in pairs. We search the first one (Attr1m), and if the pattern is found, we use the second one (Attr1u). |
ifMatch(C, Phone1, Phone1, Phone2, Phone2, Phone3, Phone3) This returns the first Phone device attribute with a "C" in it (cell phone). |
Comments
0 comments
Please sign in to leave a comment.