# help using the left function

• 0
• Question
• Updated 3 years ago

If(not IsNull([CUTSHEET_ID_OVERRIDE]),[CUTSHEET_ID_OVERRIDE],

[EWO_INFO]="GAIDA",Left([EWO_INFO], 9),Left([EWO_INFO],10))

Not sure why my Left function part of the formula not working

• 490 Points

Posted 3 years ago

• 0
• 75,104 Points
what result are you getting and what result do you expect to get. Also, for an example record which has a problem, what data is in the fields for

[CUTSHEET_ID_OVERRIDE]
[EWO_INFO]
• 490 Points
Cutsheet override is a text field, if the cutsheet ID is incorrect then use the override
EWO_INFO is a relationship field from a different table

If the Cutsheet ID is incorrect then use the override field
if the EWO = GAIDA the populate the first 9 of the field, otherwise use the first 10
• 75,104 Points
For starters, whole not obvious, it is documented that the IsNull function does not work for text fields, so that is likely the problem.

Try this

If(Trim([CUTSHEET_ID_OVERRIDE])<>"", ,[CUTSHEET_ID_OVERRIDE],

[EWO_INFO]="GAIDA",Left([EWO_INFO], 9),Left([EWO_INFO],10))
• 490 Points
Thanks, the IsNull was the problem
• 75,104 Points
ya, it's just not obvious.  I forget off hand which way it works, but it will always return either true or false regardless of if there is data or not.  I think it's always false, ie it is never null even if it is empty.

QuickBasePros (Laura Thacker), Champion

• 6,396 Points
This confuses me.

If(Trim([CUTSHEET_ID_OVERRIDE])<>"",[CUTSHEET_ID_OVERRIDE],

[EWO_INFO]="GAIDA",Left([EWO_INFO], 9),Left([EWO_INFO],10))

If EOW_INFO is equal to "GAIDA", then how can you show the left 9 characters or the left 10 characters?