Expand SOLIDWORKS PDM File ExplorerSOLIDWORKS PDM File Explorer
Expand SOLIDWORKS PDM Professional Item ExplorerSOLIDWORKS PDM Professional Item Explorer
Collapse SOLIDWORKS PDM Administration ToolSOLIDWORKS PDM Administration Tool
Expand SOLIDWORKS PDM Archive Server Configuration ToolSOLIDWORKS PDM Archive Server Configuration Tool
Expand SOLIDWORKS PDM File Version Upgrade ToolSOLIDWORKS PDM File Version Upgrade Tool
Hide Table of Contents

Input Formula Functions

You can specify string and arithmetic functions to be used to configure the values returned by the input formula.

To access the functions:

Click right arrow next to Input Formula.

Arithmetic Functions

Function Add Numbers
Description Returns the sum of the two specified numbers.
Syntax Add(<term1>,<term2>)
Arguments <term1> - First term

<term2> - Second term

Example Add(2,3)

Returns 5

Function Subtract Numbers
Description Returns the difference between the two specified numbers.
Syntax Sub(<term1>,<term2>)
Arguments <term1> - First term

<term2> - Second term (amount to be subtracted)

Example Sub(3,2)

Returns 1

Function Multiply Numbers
Description Returns the result of multiplying the two specified numbers.
Syntax Multiply(<term1>,<term2>)
Arguments <term1> - First term

<term2> - Second term (amount to multiply by)

Example Multiply(3,2)

Returns 6

Function Divide Numbers
Description Returns the result of dividing a number by a second number.
Syntax Divide(<term1>,<term2>)
Arguments <term1> - First term

<term2> - Second term (amount to divide by)

Example Divide(6,2)

Returns 3

String Functions

Function Left Substring
Description Returns the leftmost specified number of characters from a specified string.
Syntax Left(<string>,<number>)
Arguments <string> - The character string

<number> - The number of characters to be returned

Example Left(ProjectAA,7)

Returns "Project"

Function Right Substring
Description Returns the rightmost specified number of characters from a specified string.
Syntax Right(<string>,<number>)
Arguments <string> - The character string

<number> - The number of characters to be returned

Example Right(ProjectAA,2)

Returns "AA"

Function Middle Substring
Description Returns a substring from a specified string (starting at a specified position).
Syntax Mid(<string>,<startpos>,<number>)
Arguments <string> - The character string

<startpos> - The number of the starting position. The first character is position 0.

<number> - The number of characters to be returned

Example Mid(ProjectAA,2,2)

Returns "oj"

Function String X from List
Description Returns the element number X from an ordered list where the elements are delimited with a certain character.

This feature is useful in combination with controls connected to alias lists.

Syntax

$Token(<string>|<string>|<string>|<string>,<index>,|)

Arguments

<string> - List of strings to choose from.

<index> - Index of string to use. This could be a variable linked to an alias list.

| - The character used to separate the <string> values.

Example

$Token(Metal|Plastic|Metal|Organic|Plastic,,|

Where the Material variable is connected to an alias list with the following values:
Displayed Value Alias
Steel 1
Polyester 2
Gold 3
Wood 4
PVC 5
The formula string becomes Metal if the user selects Steel or Gold as the material. It becomes Plastic if the user selects Polyester or PVC.
Function String Length
Description Returns the length of a specified string.
Syntax Length(<string>)
Arguments <string> - The character string
Example Length(ProjectAA)

Returns 9

Function Find Substring
Description Searches a specified string for the first match of a character or substring. Returns the position where the character or substring is found.
The first position in the character string is 0.
Syntax Find(<string>,<substring>)
Arguments <string> - The character string

<substring> - The character substring for which to search

Example Find(abc,b)

Returns 1

Function Reversed Find Substring
Description Returns the reverse of a specified string.
Syntax Reverse(<string>)
Arguments <string> - The character string
Example Reverse(stockholm)

Returns "mlohkcots"

Function

Reverse Find

Description

Searches a specified string for the last match of a character. Returns the position where the last occurrence of the character or substring is found.

The first position in the character string is 0.

Syntax

Find(<string>,<substring>)

Arguments

<string> - The character string

<substring> - The character substring for which to search

Example

ReverseFind(abcabc,b)

Returns 4

Function Today's Date
Description Returns the current date in the format selected when the vault was created.
Syntax $Time()
Arguments

Examples

=$Time()

Returns 488a=2010-08-13



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Input Formula Functions
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: SOLIDWORKS PDM 2016 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.