Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

NetSuite Tip: Formula Fields Referencing other Formula Fields

Marketing Technical

Tags: , , , , , ,

NetSuite calculated fields are quite useful.  However, be careful using formula fields that reference other formula fields.

Saved Search Error: Invalid Expression

If you create a custom formula field that references another custom formula field, you will likely get an “Error: Invalid Expression” when referencing the custom field via Saved Search.

What may cause confusion is you can produce formula fields that reference other formula fields.  These custom formula fields will work fine if you use them to display values on forms.  They even work when you reference them in SuiteScript.  But don’t get caught thinking your formula field is fine until you test it via Saved Search.

To resolve the  Invalid Expression error, make sure your formula field references all native fields that store actual data.

Marty Zigman LinkedIn

Marty Zigman

Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

BiographyYouTubeLinkedInX (Twitter)

21 thoughts on “NetSuite Tip: Formula Fields Referencing other Formula Fields

  1. Hi Marty,

    I was wondering if you could expand on this point. Are you saying it is impossible to add two custom formula fields text together in a saved search?

    What’s the best way to get around this constraint? Can you add two formulas in one in a custom formula field?

    I couldn’t get concat to work when adding another date formula.

    Thanks,

    Gabe

    Reply
  2. hi Marty,

    I am trying to display a dashboard icon in my saved search. I have created a custom URL so clicking on the link will take the user to a custom dashboard. The problem is using the following tag creates the error, “ERROR: Field Not Found”.

    {dashboard}

    here’s the full url:

    ‘ ||{dashboard}||’

    The above code is added to the FORMULA column in a saved search.

    Note: when adding fields there is a “Project : Dashboard” field.

    thanks in advance for any help.

    Steve

    Reply
  3. Hi Marty

    I have a NetSuite field that references the ‘casetaskevent’ field.

    It gives an error of “ERROR: Field ‘casetaskevent’ Not Found” when you create a time tracking record without going through a case.

    I want the field to have a formula like excel’s iferror(formula,””)

    Is there a way to do a case when ‘error’ THEN ‘NULL’ END ?

    I want the field to be empty if it can’t find the ‘casetaskevent’ instead of giving an error message

    Thanks for your help

    Gabe

    Reply
  4. Thanks Marty, I haven’t tried NVL yet I’ll give it a go. I was able to use a condition on the workflow that the field is greater than 100 (it was an interalID field) and that was okay with the error. So it fixed my immediate issue.

    Thanks for writing back

    Reply
  5. Hello Marty, I’m actually have the exact opposite problem. It’s showing up great on my saved search but on my form it’s showing up as Error Invalid Expression. When I edit and re-save the form it will fix it on the form. Any idea why/how this could occur?

    Thank you!

    Reply
  6. I’m working on a saved search of Knowledge Base Topics in NetSuite. I can find where the results shows me fields but the field for Detailed Descripton is not in the list. When i look at the information on the field it’s called longDescription. The real interesting think is I can import CSV information to this field I just can’t pull the data back out int o a search result. Is there a way to use a Formula(text) to return the value of this Field?

    Reply
  7. Hi Marty,

    I’m trying to pull a report where a new value is compared to an old value. The Numeric forumula I’ve been banging my head against:

    case when {systemnotes.oldvalue} < {systemnotes.newvalue} then 1 else 0 end

    All my other criteria appear to work properly, but this one line is confounding me.

    Any ideas?

    Thanks,
    Dave

    Reply
  8. I am trying to pull a saved search on JE’s, and I need to reference the ‘Eliminate’ checkbox on the line-level. You can see this in the transaction XML code, but the saved search keeps returning ERROR: Field not Found

    My formula is: case when {eliminate}=’T’ then ‘Eliminating’ else ‘Not Eliminating’ end

    I took the ” off of the T as well, and received the same error.

    Any suggestions?

    Reply
  9. Yes, and they said it is being considered in future enhancements.

    Since we are unable to pull that, it’s hard to make correcting JE’s… Any suggestions on how to get an account to STOP eliminating? When you inactivate (even if balance is 0), the system gives an error during period close.

    Reply
  10. Hi Marty,
    I have created a custom wherein I let user to enter the formula. I pull the formula in my Suitescript and write a search with ‘formulanumeric’. It fails when there is CASE WHEN statement in formula. But i provide the same formula in Suitescript variable directly it works all fine.

    Any idea as to why CASE WHEN is failing when pulled formula from Custom field and same passes when hardcoded in script?

    Reply
  11. Hi Marty,

    i just want to make a simple field calculation in an entity field. My field should divide the “hr agreed to work per feek” (also a custom field) by 40.
    I tried it in many different ways but it won´t work.

    Thanks for your help!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *