Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Field Assignment - too complex to be evaluated

Posted on 2013-01-15
2
Medium Priority
?
402 Views
Last Modified: 2013-01-15
I'm having difficulty using the field assignment below as an if/then statement.  Is there another way to state it?
Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100",IIf(Left([Invoice]![Cost Center],2)=30,"102",IIf([Invoice]![Cost Center] Like "1N*","313",IIf(Left([Invoice]![Cost Center],3)>135 And Left([Invoice]![Cost Center],3)<137,"325","300"))))

The output returns: "This expression is typed incorrectly, or it is too complex to be evaluated.  For example, a numeric expression may contain too many complicated elements.  Try simplifying the expression by assigning parts of the expression to variables."
0
Comment
Question by:CFMI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 38779724
first try to find where the error is coming from, use a simple IIf expression and continue building it.

Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100","MORE")

if you don't get an error on that one, expand it like this


Entity: IIf(Left([Invoice]![Cost Center],1)=0,"100",IIf(Left([Invoice]![Cost Center],2)=30,"102","MORE"))
0
 
LVL 1

Author Comment

by:CFMI
ID: 38779833
I got it.  The answer is:

Entity: IIf([Invoice]![Cost Center] Between "135*" And "137*","325",IIf([Invoice]![Cost Center] Like "0*","100",IIf([Invoice]![Cost Center] Like "30*","102",IIf([Invoice]![Cost Center] Like "1N*","313","300"))))

Give me the points and please let's put this issue to rest.  Thanks for looking.  Sorry to bother anyone.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question