# Field calculation for text pattern

This topic is 2914 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

Hi Forum,

Please help me solve a calculation for this problem, i have a table with various records, i would like to implement a field called Order_Check that would display a "1" if the table field Order_Num begins with "PT00" if otherwise it must display "0". This field Order_Num for invoice records appear to be either empty, has value ID that begins with PT00* or just have some random values, i tried the calculation:

IF(Order_Number = "PT00*", 1, 0)

Thank you for assisting,

Miss-Amen!

##### Share on other sites

Your test will only return 1 when the contents of the Order_Number field contains pt00*, PT00*, Pt00*, or pT00*.

Why did you put an asterisk in there?

Maybe this will get you a little closer to what you want.

If ( Left ( Order_Number ; 4 ) = "PT00" ; 1 ; 0 )

Edited by Kris M
• 1
##### Share on other sites

13 minutes ago, Kris M said:

If ( Left ( Order_Number ; 4 ) = "PT00" ; 1 ; 0 )

Or shortly:

`Left ( Order_Number ; 4 ) = "PT00"`

• 1
##### Share on other sites

This topic is 2914 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account

• ### Similar Content

• #### Simple Calculation Question: Total Sum of hours per CLIENT

By Sharifa,

• 4 replies
• 501 views
• #### Capitalize sentence

By Sinky,

• 8 replies
• 987 views
• #### Disappearing field contents on printing

By Oyseka,

• 4 replies
• 840 views
• #### Problems with Reverse Calculation

By n7mafia,

• 4 replies
• 593 views
• #### How to generate different Portal line numbers for different parent record

By Guy_Smith,

• 4 replies
• 2,065 views
×
×
• Create New...