Fields (Admin)
- Conk Buckley
- Jonathan Umscheid
- Matthew Tate
Fields enable the administrator to write expressions and calculated fields in Excel-like formulas. A field may refer to a user-editable property or to a calculated field value. A calculated field can be composed of multiple property values. A Stratus.Field can be used in many places including in another Stratus.Field, a Stratus.Alias (Alias), a Filter, in Reports and Dashboards. Note: Deleting a Field will also delete the field from any report that used it.
This page includes information about all Stratus functions like Average(). Other non-Stratus functions like IsBlank() are documented in the Albatross Expression Api library under Api Documentation and then under Albatross.Expression.Operations.
Configure
To configure a field:
- Under Admin > Company > Fields, click the New Field button. The field editor displays.
- Field Definitions
- Name – Name of the field. Field names cannot contain special characters like .{}()+-/*
- Display Name - The purpose of this column is to use a Field Display Name in reports rather than the full name of the expression. There are rules as to when the Display Name is used, for example if there is not a Report Field header. See examples below.
- Three Examples: The screen shot below highlights which column heading will be used and in the order each will be used.
- Report Field Header under Admin > Company > Report > Report Field > Header.
Example: In Report Fields, the Header = Total Pipe Length - H which takes precedence over the Fields Display Name = Total Pipe Length - F.
Field Display Name under Admin > Company > Fields > Display Name.
Example: In Report Fields, there is no Header for the field in row #3, therefore, the Fields Display Name = Total Pipe Length - F displays.No Field Display Name or Report Field Header
Example: The field does not have a Display Name under Fields, nor does it have a Header under Report Fields. Therefore, the column header uses the Field Name (Ex. TotalPipeLength_NoName).
- Report Field Header under Admin > Company > Report > Report Field > Header.
- Three Examples: The screen shot below highlights which column heading will be used and in the order each will be used.
- Description – Clarification of the field purpose.
- Part Filter - The Part Filter column provides administrators with the ability to filter parts before they are processed by the Field Expression. As a result, the Field Expression will process a filtered subset of the model parts rather than the entire model which will result in faster report generation and less complicated Field Expressions. Below is a Pipe Length and an Earned Labor example.
Example - Pipe Length
Old Field Expression - The top row displays the Old Field Expression which had to query for the CID, then query parts, and then query categories to give a result.
New Part Filter - The bottom row displays the selected Part Filter (see the referenced filter below). Referencing the Part Filter makes for a simpler Field Expression (Ex. {Length}). In many cases, the Filters will have already been written and in used in viewers under Filters > Company. Expressions with a part filter will return an empty result for parts which don't match the filter.
The Part Filter referenced above does all the pre-filtering including the ServiceType, CID, Source, Product Name, and Category so that your field expression only has to ask for the {Length}.
As a result, the report (below) includes both the OLD and NEW fields to show they result in the same values.
OLD Field (Ex. CSG _ Pipework _ Dashboard _ Total Pipe Length which uses the report field column header Linear Feet Of Pipe (Total))
NEW Field (Ex. QA_CSG _ Pipework _ Dashboard _ Total Pipe Length which uses the report field column header QA_Linear Feet Of Pipe (Total)
Example - Earned Labor
Old Field Expression - The top row displays the Old Field Expression which had to query for the parts to see if it they were past a certain tracking status.
New Part Filter - The bottom row displays the selected Part Filter (see the referenced filter below). Referencing the Part Filter makes for a simpler Field Expression.
- Data Type – The following data types can be defined. Note: Selecting the correct Data Type is directly related to whether or not your Field will function properly.
- String – Works with Alphanumeric characters and for the results of a concatenated field. See the Concatenated Field example below.
- Integer - Used to calculate Numbers or set a Boolean checkbox.
- Boolean - A Boolean checkbox must have the following:
- Data Type: Integer or String
- Default Value:
- Integer: 1 = Checked checkbox, or, 0 = Unchecked checkbox
- String: true = Checked checkbox, or, false = Unchecked checkbox
- Is Editable: Checked
- Possible Values: Not Used
- Example of all Boolean Field options:
- Example of all Boolean Field option results:
- Boolean - A Boolean checkbox must have the following:
- Decimal – Used to calculate Numbers and Decimals.
- Date – Date and time stamp.
- Array - The Array Data Type generates a semicolon-separated list of values for a property, one value per part, for a package or assembly (Ex. Weight, Services, etc.). A second field should be created which processes the array resulting list of values and utilizes one of the available functions such as Maximum(), Minimum(), Average(), MostCommon(), UniqueValues(), etc. to determine the result.
Note: The Data Type "Array" should not be used in conjunction with the Is Total checkbox being checked. Array and Is Total are alternative solutions to the same problem. “Is Total” is the original method while “Array” is the new method to solve the problem.- For example, with Data Type = Array, this Field Expression will list the Service or ServiceAbbreviations for all parts in the package or assembly report.
- For example, with Data Type = Array, this Field Expression will list the Service or ServiceAbbreviations for all parts in the package or assembly report.
- Default Value – The default value, if any, that you want to be entered for this field.
- Is Editable (checked by default) – When checked, this field can be edited by users. For example, let’s say you want to add the ability to approve a package or enter an approved date. Create the new field where Is Editable is checked and then add the field to a package report. Below is an example of editing a Field on the Packages > Dashboard. Users simply click the cell to edit. Once saved, the information will be metadata attached to the package. See the Possible Values column for information on setting values for a drop-down option list.
- Possible Values (;) - The Possible Values column provides the way to set drop-down values for the editable field. When Is Editable is checked, a semi-colon separated list of possible values can be entered and will display in the report. For example:
- The values 0.30;0.50;0.70 have been entered in Possible Values column for this editable field. Note: Emojis can also be entered by pressing the [Windows key]+[.] keys the emoji popup will display and any selections can be used in the list of Possible Values.
- Note: The default value (0.30) was included and each value includes 2 decimal places since the report will display Decimal and Precision = 2.
- On the Packages Dashboard, the Possible Values will display.
- The values 0.30;0.50;0.70 have been entered in Possible Values column for this editable field. Note: Emojis can also be entered by pressing the [Windows key]+[.] keys the emoji popup will display and any selections can be used in the list of Possible Values.
- Is Expression – Check the Is Expression checkbox if you are entering an expression in the Expression field. See below for allowable expression variables, operators, and functions.
- Note: When Is Editable and Is Expression are both checked, then the calculated value will be used as the default, but then a user will be allowed to edit the values.
- Tips:
- The Field’s Data Type needs to be set to Decimal whenever the value of the Field is used in a mathematical Expression.
The Field’s Is Total property needs to be checked ON whenever the Field is referenced in a report where Item Type is Package and Package Dashboard is checked (i.e. a Packages Dashboard report) and is used to sum part values for a package (e.g. weight).
- Expressions referencing a part property that may not always be filled out or have a valid value should be wrapped with AsNumber() (e.g. AsNumber({Gauge}) ), as this will convert unrecognized values to 0.
- When a field references text, it must be enclosed in single quotes. If you are not sure, try it both ways. For example, in this expression:
if({CID}='2041' And {Stratus.Part.TrackingStatus}='Ordered', {Length}, if({CID}='2041' And {Stratus.Part.TrackingStatus}='Issued for Fabrication', {Length}, NA))- {CID}='2041' - The CID value is returned as text.
- {Stratus.Part.TrackingStatus}='Ordered' - A Tracking Status will be returned as text.
- {Length} - Length and other measurements will be returned as numbers, so they are not in single quotes.
- When editing an expression, some users have found that using a tool like Notepad++ made it is easier to see parentheses and other formatting than the Stratus dialog.
- Is Total – The Is Total field will sum the associated property value from every part in the package. When Is Total is checked, the field will return a single value, the total from all parts in the package or assembly, but are limited to only working with numeric values.
Note: The Data Type "Array" should not be used in conjunction with the Is Total checkbox being checked. Array and Is Total are alternative solutions to the same problem. “Is Total” is the original method while “Array” is the new method to solve the problem.- Ex. Generate a sum of labor hours from all parts within a package.
- Ex. Generate the total weld diameter inches for pipe welds within a package.
- Ex. Generate the total weight of all parts within a package.
- Expression – Enter your expression using the variables, operators, and functions described below. Note: If you are using an expression, be sure to check the Is Expression checkbox.
- Unit - A unit is used for Station metrics on the Shops > Dashboard > Task Velocity column.
- References - Helps administrators understand where the filters are being referenced. Click the references number to display the references (Type and Name).
- Delete - Click to delete a field. If a user attempts to delete a field that is used a Template, an error message similar to the following will display. This will help prevent accidentally deleting a field and the reports that use the field from failing.
- Variables
- Inside the expression, reference any reportable property name from the item or Stratus using curly brackets. For example:
- {Stratus.Package.RequiredDT}
- {Stratus.Field.Approved By}
- {Length}
- {Outside Diameter}
- etc.
- Inside the expression, reference any reportable property name from the item or Stratus using curly brackets. For example:
- Operators and Functions
- The following operators and functions are allowed:
- spaces are allowed within expressions
- +
- -
- /
- *
- =
- >
- <
- <> which means "does not equal"
- >=
- <=
- and
- or
- not
- pi or Pi
- avg(<comma separated list of values>)
- if(<condition>,<true result>,<false result>)
- <isBlank({property})
- format(<variable>,<C# format string>)
- left(<string>,<number of characters>)
- Today() - returns UTC date at midnight
- Now() - returns UTC date and time
- AsNumber({property})
- The following operators and functions are allowed:
If an additional field is used on the Packages Dashboard and has been edited manually or via API, the field will display in the Package's Properties tab under Additional Fields.
Examples
Fields Referenced in Report
When a report is created that uses a Stratus.Fields.X, where X is the name of the field, remember any fields that were used to create the Stratus.Fields.X field must also be included in the list of report fields. For example:
- If in the report, a Report Field like Stratus.Field.Fabrication Start Date is referenced;
- Then, review the field (Ex. Stratus.Field.Fabrication Start Date) and determine what, if any fields, make up the field. In this case it is made up of Stratus.Package.RequiredDT and Stratus.Field.Fabrication Lead Time. As a result, both of these fields must also be included in the list of Report Fields in order for the Stratus.Field.Fabrication Start Date to calculate.
"If" Statements
"if" Statement
Here is an example of a simple "if" statement:
The syntax of an if statement is:
- Data Type = Decimal
- Is Editable = Checked
- Expression = if({CID}=2041, {Length}, 0)
- This expression says, if the CID value is 2041, return the Length, if not, then it is false and ignore it.
Nested "if" Statement
A nested "If" statement provides flexibilty to check for values. Let's look at an example that has 7 "if" statements:
if({Stratus.Part.TrackingStatus}='Fabrication Complete', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Shipped', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Field Received', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Field Installed', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Tested', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Flushed', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},
if({Stratus.Part.TrackingStatus}='Inspected', {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor}, 0)))))))
This expression says:
- If the Tracking Status is Fabrication Complete, give me the results of {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor}
- If it is not Fabrication Complete, then check to see if the value is Shipped. If so, give me the results of {Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor}.
- And so on until the end and if none of the tracking statuses have returned a value, then return false (i.e. 0).
Concatenated Field
A concatenated field is a good way to bring information from different fields into a single field that can help make a report more meaningful. For example, let's say you have a field for Material and a field for Gauge and want to bring them together in a single field. To concatenate these two fields:
- Create a Field where:
- Data Type = String because concatenated fields always return text.
- Is Expression = Checked
- Expression = {MaterialGauge}+" Gauge "+{Material}
- The syntax of this expression says, give me the Material Gauge, which is a number, the plus signs let you enter text, so in this case you'll get a space after the Material Gauge, the word Gauge, and then the Material.
- The result on a report would be a single field with the value of "24 Galvanized", for example.
Weld Count
To count the number of any part, welds in this case, do an expression like this.
- Data Type = Integer because it will return numbers.
- Is Expression = Checked
- Expression = if({ServiceType}="Weld", 1, 0)
- This expression says, if Service Type is Weld, return a 1, if not return a 0. Add this field as a report field in a report and the 1's will be totaled up in a report.
Filter to parts that have Pipe Length
- One way to filter to parts that have Pipe Length is the following expression:
if({CID}=2041, {Length}, NA)- This says if, the part includes the parameter CID =2041, then display the Length. If it does not, then don't display anything for the part.
- This could be used as a report field in an Assemblies Spool BOM report to either dispaly or not display pipe length.
Filter packages to last 14 days
- To filter packages to the last 14 days (2 weeks before the Required Date of the package):
- {Stratus.Package.RequiredDT} – 14
- {Stratus.Package.RequiredDT} – 14
- To display a variable that references the property of a part, configure a field like:
- {Diameter}
- {Fabrication Hours}
- {Length}
- {Weight}
- To find the Circumference:
- {Diameter} * pi
- To find the conduit elbows centerline, create one or more fields to calculate length:
- (({radius} + {diameter}) / 2)) * {angle}
- To have function1 run for Autocad Fabrication parts and function2 on Revit parts:
- if(left({Stratus.Part.CadType},20)="Autodesk.Fabrication", <function1>,<function2>)
Ancillary Functions
The functions ValueFromArray() and TotalFromArray() are helpful when reporting on fabrication ancillary items.
ValueFromArray()
Returns Value from Array2
ValueFromArray(value1, array1, array2, [optional] instance) expects three or four arguments and returns value from array2 at index corresponding to value1 instance position in array1, otherwise empty result.
Example
A user wanted to display the highlighted content, but not the x'ed out content.
Solution
In this example, there are two ‘Fixing’ entries. By providing the optional 1-based value for instance, you can get the two values separately:
ValueFromArray(‘Fixing’,{Stratus.Ancillary.Type},{Stratus.Ancillary.Name},1) returns ‘3/8” – 16 GREENE BANG-IT ROD HANGER’.
ValueFromArray(‘Fixing’,{Stratus.Ancillary.Type},{Stratus.Ancillary.Name},2) returns ‘3/8” Hex Nut’.
You could create two new fields, one for Fixing1 and one for Fixing2 and set them equal to the expressions above. Then, if you wanted to look at the values from them and only return the value if it contains the word ‘Nut’, you could add another field and use an expression like this which would return the Nut if one exists:
If(IndexOf(‘Nut’,{Stratus.Field.Fixing1})>-1,{Stratus.Field.Fixing1},If(IndexOf(‘Nut’,{Stratus.Field.Fixing2})>-1,{Stratus.Field.Fixing2},’’),’’)
In fact, you don’t have to create separate fields, rather, you can use the same ValueFromArray() expressions in multiple places.
TotalFromArray()
Returns Total of All Values from Array2
TotalFromArray(value1, array1, array2, [optional] array3) expects three or four arguments and returns total of all values from array2 (or product of array2 and array3 if provided) at indexes corresponding to value1 positions in array1, otherwise zero.
When data is similar to the following:
The following Expressions can extract report data.
Date Functions
Two Parameters - Calculate Difference Between Two Date Fields
The Days() expression function can be used to calculate the integer value difference between two date fields (parameters). This could be used, for example, as a calculation on the Packages Dashboard.
Syntax: Days({EndDate}, {StartDate}
To use the Days() expression function:
- Create a new Field under Admin > Company > Fields where the expression is similar to the following where your two date fields replace the date fields below:
Days({Stratus.Package.RequiredDT},{Stratus.Field.Fabrication Start Date}) - Data Type = Integer
- Is Expression = Checked
- The result on the Packages Dashboard report will be similar to the following where the Days() expression function calculates the difference between the Required Date and the Fabrication Start Date.
Three Parameters - Calculate Work Days Remaining Between Two Date Fields
By adding a third parameter to the Days() Field function it can be used to calculate the work days remaining between two dates and exclude non-working days and holidays. The syntax is the following where the third parameter is 7 values that represent the 7 days of the week. It can either be hard coded in a additional field that passes in the 7 values (Ex. Ex. 0, 1, 1, 1, 1, 1, 0 indicates that 5 of 7 days are work days), or an editable checkbox fields configured that provides more granular control over work days.
Syntax: Days({EndDate}, {StartDate}, {NumberOfWeekDays})
- Below is a report example where the Fabrication Start Date (Fab Start Date) can be calculated when the Required Date (Req DT) and Fabrication Lead Time (Fab Lead) Time are entered and the days being worked are set. This report is run on the Packages Dashboard.
- To create this report, the values for the third parameter, which indicate the number of work days in the week, need to be configured.
- Example 1: The third parameter in this example will set the number of workdays per week to 5 because 5 of 7 variables are “1”.
Days({EndDate}, {StartDate}, 0, 1, 1, 1, 1, 1, 0) - Example 2: For more granular settings:
- Set the number of days that will be worked with editable checkbox fields. Notice the default value of 1 will check the checkbox.
- Reference the checkbox fields in the Days() function using the third parameter. To automatically skip holidays when counting the number of days in a work week, enter the holiday date in double quotes after the 7 days of week parameters have been entered, add double quotes “2019-10-31”.
- Add the fields to a report.
- Configure other fields, if needed, like Fabrication Lead Time and Required Date and add them to the report.
- Run the report in the Packages Dashboard.
- Set the number of days that will be worked with editable checkbox fields. Notice the default value of 1 will check the checkbox.
- Example 1: The third parameter in this example will set the number of workdays per week to 5 because 5 of 7 variables are “1”.
DateOffset() Function
The DateOffset() function calculates a date-time based on the year, day, and hour offset. The DateTime returned can be used in other functions that expect a DateTime argument.
Generic Syntax: DateOffset(DateTime, YearOffset, DayOffset, HourOffset) returns new DateTime
Example will return a 1 or 0: TrackingStatusChange({Stratus.Package.TrackingStatusLog},'Packaged',{Stratus.Package.TrackingStatusLogDT},DateOffset(Now(),-1,-7,0),'',{Stratus.Package.TrackingStatusLogBy},'Kelly Demo')
DayName() Function
The DayName() function returns the name of the day for the date.
Example: DayName({Stratus.Package.TrackingStatusLogDT})
StartOfWeek() Function
Tracking Status Functions
HoursInTrackingStatus() Function
The Hours Field Expression function (HoursInTrackingStatus) calculates the time an item has been in a tracking status. Below are 2 examples of how the Stratus.Part.TrackingStatusLog and the HoursInTrackingStatus function can be used in a Field Expression.
Calculate how long an item has been in a tracking status. For example:
The field expression below uses the new HoursInTrackingStatus function and says look at the part tracking log and then match up the part tracking status date-time for the part, and then calculate the time the part has been in the Issued tracking status.
HoursInTrackingStatus({Stratus.Part.TrackingStatusLog},{Stratus.Part.TrackingStatusLogDT},'Issued')
Note: In this example, if Issued is the current tracking status, the clock is still running, meaning the HoursInTrackingStatus function will return the time since the status change was made to the present time.
Also note: The value returned is hours. It may make more sense to convert to days by dividing by 24.0, or, in the case you want to report working days, you could divide by 5 and then multiply by 7.
Calculate how long it took to move from one tracking status to another. For example:
The field expression below uses the new HoursInTrackingStatus function and says look at the assembly tracking log and then match up the assembly tracking status date-time for Packaged and then provide the amount of time it took for the tracking status to change to Shipped, and use Eastern Standard Time.
HoursInTrackingStatus({Stratus.Assembly.TrackingStatusLog},Stratus.Assembly.TrackingStatusLogDT},'Packaged','Shipped','Eastern Standard Time')
Note: Eastern Standard Time is the specific way a time zone is referenced by Microsoft. For a list of other time zones, refer to this external article List of Timezone IDs. The time zone is needed to handle the case where the clock is still running, meaning the assembly has not reached the Shipped status in this example.
Is Total - The field’s Is Total checkbox should be checked when the report used by the field needs to drill into the part level to total hours.
TrackingStatusChange() Function
The TrackingStatusChange() function can provide report data that answers questions like “How may many feet of pipe cut are cut or spools welded per day, per week, per month?
This function returns a 0 or 1. As a result, it can be determined whether the tracking status has been applied, given the optional filters. By returning a 0 or 1, it can be multiplied by whatever the desired metric unit is from the part (Ex. Diameter). By building an integer Field with ‘Is Total’ checked and using an integer field in a package report, totals per package can be summarized.
The following is a list of generic function arguments that provide the following:
Tracking status applied
Timespan to filter (optional)
User to filter (optional)
Generic Syntax: TrackingStatusChange({Stratus.*.TrackingStatusLog}, TrackingStatus, {Stratus.*.TrackingStatusLogDT}, StartDT, EndDT, {Stratus.*.TrackingStatusLogBy}, UserName)
Example
Below is an example of a Packages Dashboard report that uses the field expression that will display the total weld inches completed last week (in the last 7 days) by a specific weld station operator (Kelly Demo.
TrackingStatusChange({Stratus.Part.TrackingStatusLog},'Fabricated',{Stratus.Part.TrackingStatusLogDT},DateOffset(Now(),0,-7,0),'',{Stratus.Part.TrackingStatusLogBy},'Kelly Demo')*{Diameter}
Use Cases
There are 4 possible use cases, depending on optional arguments.
Return 1 if TrackingStatus has ever been applied
Generic Syntax: TrackingStatusChange({Stratus.*.TrackingStatusLog}, TrackingStatus)
Example: TrackingStatusChange({Stratus.Package.TrackingStatusLog},'Packaged')
Return 1 if TrackingStatus has been applied between StartDT and EndDT. Note: It is acceptable to provide only one of the date arguments, leaving out that date time-bound check.
Generic Syntax: TrackingStatusChange({Stratus.*.TrackingStatusLog}, TrackingStatus, {Stratus.*.TrackingStatusLogDT}, StartDT, EndDT)
Example: TrackingStatusChange({Stratus.Package.TrackingStatusLog},'Packaged',{Stratus.Package.TrackingStatusLogDT},'09/01/2020','09/30/2020')
Return 1 if TrackingStatus has ever been applied by a particular station or user name.
Generic Syntax: UserNameTrackingStatusChange({Stratus.*.TrackingStatusLog}, TrackingStatus, '', '', '', {Stratus.*.TrackingStatusLogBy}, UserName)
Example: TrackingStatusChange({Stratus.Package.TrackingStatusLog}, 'Packaged', '', '', '', '', {Stratus.Package.TrackingStatusLogBy}, 'Kelly Demo')
Returns 1 if TrackingStatus has been applied between StartDT and EndDT by UserName
Generic Syntax: TrackingStatusChange({Stratus.*.TrackingStatusLog}, TrackingStatus, {Stratus.*.TrackingStatusLogDT}, StartDT, EndDT, {Stratus.*.TrackingStatusLogBy}, UserName)
Example: TrackingStatusChange({Stratus.Package.TrackingStatusLog}, 'Packaged', {Stratus.Package.TrackingStatusLogDT}, '09/01/20','09/30/20', {Stratus.Package.TrackingStatusLogBy}, 'Kelly Demo')
TrackingStatusDate() Function
The TrackingStatusDate() function is used to determine the date-time of a specific tracking status change.
Below is an example of TrackingStatusDate():
Generic Syntax: TrackingStatusDate({Stratus.*.TrackingStatusLog}, 'YourTrackingStatus', {Stratus.*.TrackingStatusLogDT})
This example will return the date-time the Package’s Tracking Status changed to Packaged: TrackingStatusDate({Stratus.Package.TrackingStatusLog}, 'Packaged', {Stratus.Package.TrackingStatusLogDT})
Field Configuration:
Notice the Data Type = String. If Data Type = Date it will only return the date, not the time.
Report Property Configuration Example:
Notice the Format = String. If Format = Date it will only return the date, not the time.
Packages Dashboard Report Examples
The date-time is returned when the Package’s Tracking Status was changed to Packaged.
TrackingStatusOnDate() Function
The TrackingStatusOnDate() function can be used in a Field Expression to determine the tracking status of a package at a specific time, either Now() or DateOffset(Now()).
Now() - When used with the Now() function, the package’s tracking status at the time the report is run will be returned. Alternatively, the Today() function will return the package’s tracking status at midnight.
Now() syntax example - TrackingStatusOnDate({Stratus.Package.TrackingStatusLog}, {Stratus.Package.TrackingStatusLogDT}, Now())DateOffset(Now()) - When used with DateOffset(Now()), the package’s tracking status for x number of days (Ex. -7) in the past can be displayed.
DateOffset(Now()) syntax example - {Stratus.Package.TrackingStatusLogDT}, DateOffset(Now(), 0, -7, 0))
TrackingStatusBy() Expression Function
The TrackingStatusBy() function is used to determine the name of the user who made a specific tracking status change.
Below is an example of TrackingStatusBy():
Generic Syntax: TrackingStatusBy({Stratus.*.TrackingStatusLog}, TrackingStatus, {Stratus.*.TrackingStatusLogBy}, UseLastIndex)
Note: UseLastIndex defaults to False which will return the last username that changed the tracking status to the configured tracking status. If it is set to True, it will return the username who first changed the tracking status to Packaged.
This example will return the UserName who first changed the tracking status to Packaged if found, otherwise empty:
TrackingStatusBy({Stratus.Package.TrackingStatusLog}, 'Packaged', {Stratus.Package.TrackingStatusLogBy}, True)
Field Configuration:
Report Property Configuration Example:
Packages Dashboard Report Example:
{TrackingStatusLog}
The {Stratus.*.TrackingStatusLog} field returns a semi-colon separated list of tracking status changes. Replace the * with Part, Package, or Assembly.
{TrackingStatusLogDT}
The {Stratus.*.TrackingStatusLogDT} field returns a semi-colon separated list of tracking status change date-times. Replace the * with Part, Package, or Assembly.
{TrackingStatusLogBy}
The {Stratus.*.TrackingStatusLogBy} field returns a semi-colon separated list of user names who made each tracking status change. Replace the * with Part, Package, or Assembly.
{Stratus.*.TrackingStatusLogStation}
The {Stratus.Part.TrackingStatusLogStation} field returns a semi-colon separated list of stations who made each tracking status change to the part. Replace the * with Part, Package, or Assembly.
Below is an example of {Stratus.Package.TrackingStatusLogStation}:
Generic Syntax: TrackingStatusChange({Stratus.*.TrackingStatusLog}, ‘TrackingStatus’, {Stratus.Package.TrackingStatusLogStation}, 'Station')
Example will return a 1 or 0 if the Signed in station (< 7" Carbon Steel IPS) changes the tracking status to Issued for Fabrication: TrackingStatusChange({Stratus.Package.TrackingStatusLog},'Issued for Fabrication','','','',{Stratus.Package.TrackingStatusLogStation},'< 7" Carbon Steel IPS')
Property Name in Report: The Stratus.Package.TrackingStatusLogStation Property Name can be selected as a report field to display all stations that have changed the tracking status of the package.
Field Configuration:
Report Property Configuration Example:
You’ll see the following report fields on the Packaged Dashboard report below.
Row 12 uses a Field Expression that references the property.
Row 13 displays the property values.
Packages Dashboard Report Examples
Example A
The Package Tracking Status Log Station displays a 1 since the above Field Expression is true, namely, the < 7" Carbon Steel IPS station was Signed in and changed the tracking status to Issued for Fabrication.
The Stratus.Package.TrackingStatusLogStation property displays the name(s) of the Signed in Station(s) that have changed the tracking status.
Example B
The Package Tracking Status Log Station displays a 0 since the above Field Expression is false, namely, other stations changed the tracking status and Issued for Fabrication may or may not have been one of the tracking status changes.
The Stratus.Package.TrackingStatusLogStation property displays the name(s) of the Signed in station(s) that changed the tracking status.
String Manipulation and Count Functions
IndexOf() and LastIndexOf()
The IndexOf() and LastIndexOf() functions provide a way to manipulate strings within field expressions. See the Tracking to Packaged most recent change column in the screenshot above.
IndexOf(String1,String2) - Returns the first character index of a search string within another string value or -1 if not found or empty.
LastIndexOf(String1,String2) - Returns the last character index of a search string within another string value or -1 if not found or empty.
Example
To display the date-time for the most recent tracking status change for a package in the Packages Dashboard, create a Field that contains the following Field Expression and then reference the field in a report:
If(LastIndexOf(';',{Stratus.Package.TrackingStatusLogDT}) > -1, Right({Stratus.Package.TrackingStatusLogDT}, AsNumber(Len({Stratus.Package.TrackingStatusLogDT})) - LastIndexOf(';',{Stratus.Package.TrackingStatusLogDT}) - 1), {Stratus.Package.TrackingStatusLogDT})
Note: To find a single \ character in a string, the field must look for \\ surrounded by single quotes. Example: if(IndexOf('\\',...)
ArrayCount()
The Array Count function expects one argument and returns a count of items found in semi-colon separated list of values, or zero if empty.
Syntax: ArrayCount(array)
Example: ArrayCount({Stratus.Part.TrackingComments})
ValueAtIndex()
The Value At Index function expects two arguments and returns the value from the array at 1-based index, otherwise empty result.
Syntax: ValueAtIndex(array, index)
Example: ValueAtIndex({Stratus.Part.TrackingComments},ArrayCount({Stratus.Part.TrackingComments}))
MostCommon()
MostCommon(array, [optional] ignoreEmpty=true) which takes a list of numeric semicolon-separated values and returns the the most common value with the option to ignore empty values. The MostCommon function displays the most common value from child parts.
Syntax: MostCommon(array, [optional] ignoreEmpty=true) expects 1 or 2 arguments and returns the most common value found in semicolon separated array of values with option to ignore empty values
Example: MostCommon({ServiceAbbreviation}) returns the most common "ServiceAbbreviation" value in the array.
In this example, ServiceAbbreviation is setup as the 'Array’ data type which this means it is intended to process each part and return a value for each one in a list. As a result, the expression specified is going to operate within the context of each part, meaning it is going to say, give me the most common value from part 1, then the most common value from part 2, etc., and combine the results in a semi-colon separated list. When using the ‘Array’ data type and wanting to get a MostCommon() value from the resulting list, you must create a second field that is a string data type and operates on the first field’s resulting array list that will work and give the desired result of the single most common value from the array list of values
UniqueValues()
UniqueValues(array) expects one argument as a semicolon-separated list of values and returns a semicolon-separated list of each unique value from the original list. An optional second argument can be passed to the function as true if you want the quantity displayed in front of each unique value in the result.
Example 1: If listOfValues is: 3.1;3.1;4.2;4.2;4.2;5.3;5.3;5.3;5.3
UniqueValues(listOfValues) will return: 3.1;4.2;5.3
Example 2 optional second argument: In the example below, the Parts Description List field results in the description of each part and the UniqueValues() function is applied to it.
Results
Sum()
Sum(array) which takes a list of semicolon-separated values and returns the sum.
Syntax: Sum(array) will total the list of semicolon-separated values
Example: Sum(If({Stratus.Part.TrackingStatusIndex}>4{Weight},0))Sum({Weight})*100
Average()
Average(array) which takes a list of numeric values and returns the average value.
Maximum()
Maximum(array) which takes a list of values and returns the maximum numeric value or zero.
Minimum()
Minimum(array) which takes a list of values and returns the minimum numeric value or zero.
ROUND()
The ROUND(<expression>, [rounding multiple],[direction]) function can be used in formulas for calculated fields. The direction parameter is optional and enables you to force rounding either “UP” or “DOWN” (or “NEAREST”, which is the optional default value). How you spell ROUND and Field Functions is case insensitive. Precision defaults to 1.
- Value can be a variable such as {CutLength}
- Precision is the decimal increment to round to.
Examples:
- round({Total Cost}), round({Total Cost},1), round({Total Cost},1,"NEAREST"), and round({Total Cost},,”NEAREST”) yield identical results, rounding to the nearest integer:
- round(42.35) will result in 42 and round(42.55) will result in 43;
- round({Total Cost},2,"NEAREST") or round({Total Cost},2) will round to the nearest even number:
- round(43.21,2) will result in 44 ;
- round(42.75, 2) will result in 42;
- round({Total Cost},2,”UP”) will always round up:
- round(43.21,2) will result in 44 ;
- round(42.75, 2) will result in 44;
- round({Total Cost},2,”DOWN”) will always round down:
- round(43.21,2) will result in 42 ;
- round(42.75, 2) will result in 42;
Precision Examples:
Precision can also be a decimal number.
round({Total Cost},0.25) will round to the nearest .25, thus:
- round(22.22,0.25) results in 22.25;
- round(14.86, 0.25) results in 14.75;
- round({Total Cost},0.25,”UP”) will round up to the next .25, thus:
- round(315.12,0.25,”UP”) results in 315.25;
- round({Total Cost},0.25,”DOWN”) will round down to the closest .25, thus:
- round(315.12,0.25,”DOWN”) results in 315.00;
You can include a Stratus Field in a report and you can control the display precision within the report definition. An example of a Field For example Round({Total Cost},2)
Absolute Function Abs()
The Absolute Function Abs() will calculate the absolute value of a number. One use for the Abs() is that displaying a center line offset would result in negative number that could be displayed as a positive number instead.
Below is example displaying a difference between dates:
- The field below calculates the number of days between a Required Date and the Current Date and results in a negative number.
Days({Stratus.Package.RequiredDT},{Stratus.Report.CurrentDate}) - Adding the Abs () function to this field results in the absolute value of the calculation.
ABS(Days({Stratus.Package.RequiredDT},{Stratus.Report.CurrentDate}))
Split() Function and Fixed Len()
The Split() Function and Len() function.
Len Example should return ‘2-3-4-5’:
Right('1-2-3-4-5',Len('1-2-3-4-5')-2)
Split example should return ‘1;2;3;4;5’:
Split('1-2-3-4-5','-')
AsFeetInch() Function - Expression
The AsFeetInch() function provides the ability to format decimal dimension values as feet-inch for display purposes in field expressions. This is useful when you want to format a value that does not use the Report Engine Display Format value, like a bottom of pipe calculation on a sticker, for example, which uses the raw Storage Format value.
Below is an example of AsFeetInch():
Generic Syntax: AsFeetInch(Feet, Precision (optional, defaults to 8), Format (optional, defaults to 0, 0=feet-inch-fraction, 1=inches-fraction))
This example will return a formatted string with the feet, precision of 2, as feet-inch fraction:
AsFeetInch(Stratus.Field.GTP Linear Feet,2,0)
Field Configuration:
Report Property Configuration Example:
Packages Dashboard Report Example:
AsFeetInch() Function - Leading Zero
If your company uses AsFeetInch, it was configured as an Expression in a Field. A new optional parameter has been added to the AsFeetInch which can be set to manage the Leading Zero. As a result, the Leading Zero setting under Admin > Company > Settings is ignored.
Below is an example before the new optional leading parameter was available:
AsFeetInch({Stratus.Field.GTP Linear Feet},4,0)
Below is an example of using the new optional Leading Zero parameter at the end of the expression:
Syntax: AsFeetInch(Feet, Precision (optional, defaults to 8), Format (optional, defaults to 0, 0=feet-inch-fraction, 1=inches-fraction), Leading 0’s)
Leading 0’s Optional Settings:
Default = 3
0 = Leading Zero = Feet And Inches; Ex. AsFeetInch({Stratus.Field.GTP Linear Feet},4,0,0)
1 = Leading Zero = Inches; Ex. AsFeetInch({Stratus.Field.GTP Linear Feet},4,0,1)
2 = Leading Zero = Feet; Ex. AsFeetInch({Stratus.Field.GTP Linear Feet},4,0,2
3 = Leading Zero = None; Ex. AsFeetInch({Stratus.Field.GTP Linear Feet},4,0,3)
Below is an example to display the AsFeetInch expression with the default (3) no leading 0’s:
AsFeetInch({Stratus.Field.GTP Linear Feet},4,0,3)
AsMetric() Function - Expression
The AsMetric() expression allows caller to convert a numeric value from feet units to metric mm, cm, or m units and also control the number of decimal places displayed in the resulting string.
Syntax:
AsMetric({PropertyName}, ‘mm’, 0)
This would convert units to mm and output numeric value with zero decimal places shown.
AsMetric() expects one, two, or three arguments:
Feet (decimal value from property for calculation)
Precision (optional number of decimal places, defaults to 0)
Format (optional, defaults to 0, where 0=mm, 1=cm, 2=m)
and returns the formatted string result.
Examples:
AsMetric({Length})
AsMetric({Length},2)
AsMetric({Length},2,2)
where the 2nd and 3rd arguments are optional as specified above
Replace() Function
The Replace() expression function can be used to replace one string with another string.
Syntax: Replace(inputstring, stringtoreplace, replacewithstring)
inputstring- A original list of values.
stringtoreplace - The string to be replaced.
replacewithstring - The string to replace with.
Example: Replace({Stratus.Part.HoleInfo},";","\\&")
FilterArray() Function
The FilterArray() expression function can be used to filter results in or out. This could be used, for example, to filter results on the Packages Dashboard.
Syntax: FilterArray(inputArray, arrayOfItemsToFilter, boolFilterInclude)
inputArray - A semicolon separated list of values to filter
arrayOfItemsToFilter - A semicolon separated list of values to filter
boolFilterInclude - The optional third argument, defaulted to false where the arrayOfItemsToFilter are removed, is true if the results should include only the arrayOfItemsToFilter values.
Case 1: FilterArray({Stratus.Field.Array Example Array Creation},"Filter this text out", false)
Case 2: FilterArray({Stratus.Field.Array Example Remove Blanks Case 1},"", false)
Case 3: FilterArray({Stratus.Field.Array Example Array Creation},"Filter this text out", false)
Added Field Expression to Return an Assembly’s First Non-empty Value from Child Parts
Added the ability to create a Field and a Field Expression where Is Total is enabled and Data Type is String (non-numeric) which will evaluate each Assembly and return the first non-empty value from its child parts. For example:
Field setup includes:
Data Type = String
Is Expression = Checked
Is Total = Checked
Report setup includes:
Item Type = Package Details or Assembly
Report Field - Add the field to the report.
Run the report. It will return the value for each assembly row.
Checkbox
A checkbox field can be used on a Packages Dashboard report.
Here’s how to configure the checkbox field:
- Configure a Field where:
- Data Type – The following data types can be defined. Note: Selecting the correct Data Type is directly related to whether or not your Field will function properly.
- String – Works with Alphanumeric characters and for the results of a concatenated field. See the Concatenated Field example below.
- Integer - Used to calculate Numbers or set a Boolean checkbox.
- Boolean - A Boolean checkbox must have the following:
- Data Type: Integer or String
- Default Value:
- Integer: 1 = Checked checkbox, or, 0 = Unchecked checkbox
- String: true = Checked checkbox, or, false = Unchecked checkbox
- Is Editable: Checked
- Possible Values: Not Used
- Example of all Boolean Field options:
- Example of all Boolean Field option results:
- Boolean - A Boolean checkbox must have the following:
- Data Type – The following data types can be defined. Note: Selecting the correct Data Type is directly related to whether or not your Field will function properly.
Hide Value when Expression is not met
If you have a report, like a length report, that displays all length values, you might want to hide values that don't meet criteria or result "0". For example:
- A field can configured to display all lengths (Length All Column in step #3):
- Or, a field can be configured to display lengths that meet criteria or display blank if the result is "0" (Length NA Column in step #3). Note: To display blank if the result is "0", the NA syntax must be exact i.e. if({CID}=2041, {Length}, NA)
- Compare the results below
Use Tracking Status Index Number
A Tracking Status Index number corresponds to the Tracking Status sequence number. This Tracking Status Index number can be used in Reports and Field Expressions that want to compare tracking statuses using greater than or less than nomenclature. An example of a Field Expression:
- Determine the Tracking Status Index Number on the Admin > Company > Tracking Status > Sequence column. Note: The sequence number can be edited which would impact any Field Expressions you might have created.
- Create a Field Expression that uses the Tracking Status Index number {Stratus.*.TrackingStatusIndex}.
- Add the Field Expression to a Report.
- Run the report. In this case, it is a Packages Dashboard report.
Square Root
Example
36^(1/2)
This will return 6, similarly substituting 25 instead of 36 will return 5.
SIMPLE IF STATEMENTS
if({CID}=2041, {Length}, NA)
If({CID}='2522' And {Install Type}="Welded", 1, 0)
If({CID}='838', 'All Thread Rod', {Item Description})
If(CreateDate(1900,1,1) > {Stratus.Package.RequiredDT}, 0, {Stratus.Package.RequiredDT}-{Stratus.Field.GTP Fabrication Lead Time})
if({Size}='1/2"ø-1/2"ø', '1/2"ø',
if({Size}='3/4"ø-3/4"ø', '3/4"ø',
if({Size}='1"ø-1"ø', '1"ø',
if({Size}='1 1/4"ø-1 1/4"ø', '1 1/4"ø',
if({Size}='1 1/2"ø-1 1/2"ø', '1 1/2"ø',
if({Size}='2"ø-2"ø', '2"ø',
if({Size}='2 1/2"ø-2 1/2"ø', '2 1/2"ø',
if({Size}='3"ø-3"ø', '3"ø',
if({Size}='4"ø-4"ø', '4"ø',
if({Size}='6"ø-6"ø', '6"ø',
if({Size}='8"ø-8"ø', '8"ø',
{Size})))))))))))
If({Stratus.Part.TrackingStatusIndex}>10,{Installation Cost}*{Stratus.Field.GTP Fabrication Labor Factor},0)
OR
If({Stratus.Part.TrackingStatusIndex}=10,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.15),
If({Stratus.Part.TrackingStatusIndex}=11,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.6),
If({Stratus.Part.TrackingStatusIndex}=12,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.5),
If({Stratus.Part.TrackingStatusIndex}=13,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.8),
If({Stratus.Part.TrackingStatusIndex}=14,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.9),
If({Stratus.Part.TrackingStatusIndex}=15,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.95),
If({Stratus.Part.TrackingStatusIndex}=16,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*.95),
If({Stratus.Part.TrackingStatusIndex}>16,({Installation Hours}*{Stratus.Field.GTP Fabrication Labor Factor}*1),
0))))))))
If({ALL THREAD TYPE}= '3/8"', '(2) 3/8" Washers',
If({ALL THREAD TYPE}= '1/2"', '(2) 1/2" Washers',
If({ALL THREAD TYPE}= '5/8"', '(2) 5/8" Washers',
If({ALL THREAD TYPE}= '3/4"', '(2) 3/4" Washers',
'No Washers'))))
if({Stratus.Part.CadType}="Autodesk.Revit.DB.FabricationPart", AsNumber{Stratus.Part.CutLengthAdjustment}*.0833,if({Stratus.Part.CadType}="Autodesk.Fabrication.Item", AsNumber{Stratus.Part.CutLengthAdjustment}))
if({Hole Side #4}='Front',"Left",if({Hole Side #4}='Back',"Right"),"None")
TREATING PARAMETERS AS NUMBERS
AsNumber({Stratus.Part.Point.AFF})-{Diameter}*0.5
ISBLANK
IsBlank should be used in place of equals to a set of double quotes. This is especially useful for ITM parts when you want to utilize the “Product xxx” Properties in Stratus but some of your parts are missing the data.
Before:
If({Product Size}= "",{Size},{Product Size})
After:
If(isBlank({Product Size}),{Size},{Product Size})
Alternatively you can add the “Not” function before the isblank(). This usage is less common but it will provide the inverse effect so if that property does have data the true result will be returned.
Example:
If(Not(isBlank({Product Size})),{Product Size},{Size})
PASS THROUGH FIELDS
{Installation Cost}
SIMPLE CONCANTENATED FIELDS
{C1}+" x "+{C2}
"POLISHING FIELD" AND CONCANTENATED
if({CID}='2041', {Stratus.Field.GTP C1}+" x "+{Stratus.Field.GTP C2}, " ")
if({C1}="Grooved End", 'GRV',
if({C1}="Copper Ftg", 'PE',
if({C1}="Bevel End 37.5", 'BEV',
if({C1}="NoHub", 'PE',
{C1}))))
if({C2}="Grooved End", 'GRV',
if({C2}="Copper Ftg", 'PE',
if({C2}="Bevel End 37.5", 'BEV',
if({C2}="NoHub", 'PE',
{C2}))))
if({CID}='2041', {Item Description}+" "+"("+{Stratus.Field.GTP End Prep}+")", {Item Description})
If({Length A}>0 and {Length A}<24, 24,
If({Length A}>24 and {Length A}<48, 48,
If({Length A}>48 and {Length A}<72, 72,
If({Length A}>72 and {Length A}<96, 96,
If({Length A}>84 and {Length A}<120, 120,
If({Length A}>120 and {Length A}<144, 144,
If({Length A}>120 and {Length A}<144, 144,
{Length A}))))))
MATERIAL TRANSLATION
if({Material}="A53", 'Carbon Steel',
if({Material}="A53 Double Radom", 'Carbon Steel',
if({Material}="Carbon Steel", 'Carbon Steel',
if({Material}="Cast Iron", 'Carbon Steel',
if({Material}="Ductile Iron", 'Carbon Steel',
if({Material}="Forged Steel", 'Carbon Steel',
if({Material}="Malleable Iron", 'Carbon Steel',
if({Material}="Brass", 'Copper',
if({Material}="Bronze", 'Copper',
if({Material}="Hard Copper", 'Copper',
if({Material}="Lead Free Brass", 'Copper',
if({Material}="Sch 80 PVC", 'PVC',
if({Material}="None", 'Defined As None',
if({Material}="Undefined", 'Defined As None',
if({Material}="Galvanized Carbon Steel", 'Galvanized Carbon Steel',
if({Material}="Structural Carbon Steel", 'Structural Steel',
if({Material}="ACR Hard Copper", 'Copper',
if({Material}="ACR Soft Copper", 'Copper',
if({Material}="A53_21", 'Carbon Steel',
if({Material}="A53 TOE Nipple", 'Carbon Steel',
if({Material}="304L Stainless Steel", 'Stainless Steel',
if({Material}="304 Stainless Steel", 'Stainless Steel',
if({Material}="No Hub Cast Iron", 'Cast Iron',
if({Material}="PVC", 'PVC',
if({Material}="CPVC", 'PVC',
'No Material Defined')))))))))))))))))))))))))
JOINT METHOD
if({C1}="BE", 'Welded',
if({C1}="150 FF Flange", 'Flanged',
if({C1}="MPT", 'Threaded',
if({C1}="HexEnd FPT", 'Threaded',
if({C1}="Copp MPT", 'Threaded',
if({C2}="BW", 'Welded',
if({C2}="BE", 'Welded',
if({C2}="SS BE", 'Welded',
if({C2}="SW", 'Socket Weld',
if({C2}="WS", 'Socket Weld',
if({C2}="GE", 'Grooved',
if({C2}="Vic 77 Coupling", 'Grooved',
if({C2}="Vic 07 Coupling", 'Grooved',
if({C2}="741 Flange Washer RF", 'Grooved',
if({C2}="150 FF Flange", 'Flanged',
if({C2}="150 RF Flange", 'Flanged',
if({C2}="150 RF Lug Patt", 'Flanged',
if({C2}="300 FF Flange", 'Flanged',
if({C2}="Blind", 'Flanged',
if({C2}="Copp FPT", 'Threaded',
if({C2}="Copp MPT", 'Threaded',
if({C2}="FPT", 'Threaded',
if({C2}="FPT Bushing", 'Threaded',
if({C2}="HexEnd FPT", 'Threaded',
if({C1}="MPT", 'Threaded',
if({C2}="MPT", 'Threaded',
if({C2}="MPT Joint", 'Threaded',
if({C2}="Thermowell FPT", 'Threaded',
if({C2}="Copp SC", 'Sweat',
if({C2}="Copper Ftg", 'Sweat',
if({C2}="Copper Solder Cup", 'Sweat',
if({C2}="OD Copp SC", 'Sweat',
if({CID}="2875", 'Welded',
if({C2}="NoHub", 'No Hub',
if({C2}="DWV Copp Ftg", 'Sweat',
if({C2}="Sch40 DWV PVC Plain", 'Solvent',
'No Joint Defined'))))))))))))))))))))))))))))))))))))
MATERIAL COST
Carbon Steel BW
if(({Stratus.Field.00GTP Material Translation}="Carbon Steel") And ({Stratus.Field.00GTP Joint Method}="Welded"), {Installation Cost}, 0)
Carbon Steel FLG
if(({Stratus.Field.00GTP Material Translation}="Carbon Steel") And ({Stratus.Field.00GTP Joint Method}="Flanged"), {Installation Cost}, 0)
Carbon Steel GRV
if(({Stratus.Field.00GTP Material Translation}="Carbon Steel") And ({Stratus.Field.00GTP Joint Method}="Grooved"), {Installation Cost}, 0)
Carbon Steel THD
if(({Stratus.Field.00GTP Material Translation}="Carbon Steel") And ({Stratus.Field.00GTP Joint Method}="Threaded"), {Installation Cost}, 0)
Carbon Steel SW
if(({Stratus.Field.00GTP Material Translation}="Carbon Steel") And ({Stratus.Field.00GTP Joint Method}="Socket Weld"), {Installation Cost}, 0)
Copper SWT
if(({Stratus.Field.00GTP Material Translation}="Copper") And ({Stratus.Field.00GTP Joint Method}="Sweat"), {Installation Cost}, 0)
Copper THD
if(({Stratus.Field.00GTP Material Translation}="Copper") And ({Stratus.Field.00GTP Joint Method}="Threaded"), {Installation Cost}, 0)
Copper Press
if(({Stratus.Field.00GTP Material Translation}="Copper") And ({Stratus.Field.00GTP Joint Method}="Press"), {Installation Cost}, 0)
Copper Grooved
if(({Stratus.Field.00GTP Material Translation}="Copper") And ({Stratus.Field.00GTP Joint Method}="Grooved"), {Installation Cost}, 0)
Stainless Steel BW
if(({Stratus.Field.00GTP Material Translation}="Stainless Steel") And ({Stratus.Field.00GTP Joint Method}="Welded"), {Installation Cost}, 0)
Cast Iron No Hub
if(({Stratus.Field.00GTP Material Translation}="Cast Iron") And ({Stratus.Field.00GTP Joint Method}="No Hub"), {Installation Cost}, 0)
PVC Solvent Weld
if(({Stratus.Field.00GTP Material Translation}="PVC") And ({Stratus.Field.00GTP Joint Method}="Solvent"), {Installation Cost}, 0)
PVC Flanged
if(({Stratus.Field.00GTP Material Translation}="PVC") And ({Stratus.Field.00GTP Joint Method}="Flanged"), {Installation Cost}, 0)
HTML IN FIELDS (NOT SUPPORTED!)
If({Stratus.Field.PMC Projected Hours}>{Stratus.Field.PMC Labor},'<span class="glyphicon glyphicon-exclamation-sign"> </span><span style="background-color:red;color:white;font-weight:bold;">Projected Overrun</span><span class="glyphicon glyphicon-exclamation-sign">', 'Project On Target')
Field Syntax Errors
Different types encountered within the same operation
The Different types encountered within the same operation error indicates that a field is being read as a number value instead of a text value. A quick fix is to use the Text() function to make sure the field is being treated as text. For example, if the field values were {C1} and {Fabrication Notes}, try replacing them as Text({C1}) and Text({Fabrication Notes}) in the expression.
Videos
12/03/2020 - Leveraging your data with Fields
04/30/2020 Implementation Webinar - Using Fields in Stratus
04/25/19 Implementation Webinar - Write Field Expressions and Calculated Fields
© Copyright 2022 GTP Services, LLC All rights reserved. | About | Contact