Evaluate function in teststand status expression

Hello,
I can not understand the meaning of function Evaluate() in below sentence,and can not find the explanation in help files,could someone help me ?
Step.DataSource != "Step.Result.PassFail" ? Step.Result.PassFail = Evaluate(Step.DataSource) : False, Step.Result.PassFail ? "Passed" : "Failed" 
Solved!
Go to Solution.

As an added point of reference, we use the "Evaluate()" function to to parse Variables in a Step Name for TestStand steps.  This makes our steps very readable and FAST to code in TestStand.
For example our tests to communicate to a device might be to write a value to a value to a specific parameter, such as writing a Setpoint Value.  So the TestStand step name would look like:
[] Writeetpoint(1)=200
    Where Setpoint is the Parameter Name, (1) represents the Instance, and 200 is the value written
However we use the Evaluate() function to parse out variables:
Locals.sParameter = "Setpoint"
Locals.nInstance = 1
Parameters.nValue = 200
[]Write:{L.sParameter}({L.nInstance})={P.nValue}
   (We use a shortened version of L. for Locals., P. for Parameters., etc. because it doesn't take up so much space on the Step Name)
We have a library subsequence (Check for Curly Brackets to be parsed) that parses out any variables that are enclosed in the {} curly brackets.
  Replace "L." with "Locals.", etc. and then parse out the variables in the Pre-Expression, 
and then EVALUATE the variables in the Post-Expression:
Locals.sTemporary ="RunState.Caller.RunState.Caller."& Locals.sVariable,
'If the variable exists, resolve it, if not replace it with '{ERROR}' and continue.
Locals.sTemporary =( PropertyExists(Locals.sTemporary)? Evaluate(Locals.sTemporary)  :"{ERROR}"),
'Put the resolved variable (or error) back in place of its name
Locals.sWorkingString = Locals.sBeforeVar & Locals.sTemporary & Locals.sAfterVar
Also, during runtime, if there happens to be an error in the StepName, we can edit it and continue on using a "Set Step Name" tool.
Mike

Similar Messages

  • Multiple Numeric Limit Test - Evaluate Post and Status Expression

    We have a Multiple Numeric Limit Test where the limits for one of the measurements is a function of one of the other measurements.
    In the Post-Expression there are two expressions that set the low and high limit based on one of the readings.
    But the comparison does not seem to be using the calculated limits.
    The report file shows the correct calculated Low and High Limits, and shows the measured reading as being in between the Low and High limit, but fails that measurement. I feel the Status Expression is using the default limits that are out of range.
    The post expression looks like this
    Step.Result.Measurement[2].Limits.Low=Step.NumericArray[1]*1.9,
    Step.Result.Measurement[2].Limits.High=Step.NumericArray[1]*2.1
    In Table 3-4 "Order of Action that a Step Performs", Evaluate Post-Expression (Action #15) is before Evaluate Status Expression (Action #16), but it seems that is not the case.
    Or am I changing the wrong Low and High Limits. Am I just changing the Limits used in the report file and not the limits used for comparison?
    Again the correct low and high limits are in the report but not used for comparison. 
    Thanks

    Digging into the NI step type for Multiple Numeric Limit Test, I find that the comparison is done at Post-Step substep which is before my Post Expression is evaluated to set the correct limits.
    So I have added code to my VI module to set the limits after taking the measurements but before returning to TestStand.

  • [nQSError: 42015] Cannot function ship the following expression: Evaluate(

    Hi,
    I am getting the following error when using evaluate function
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( TO_CHAR(%1),D907.c2) . (HY000)
    The syntax I had used in the column expression was
    EVALUATE('TO_CHAR(%1)' AS CHAR,"SA table"."Prior Quarter QTD Dollars")
    I am not sure why this is error is occurring because I have successfully used this syntax before. This is an example syntax I had used in another report and it is working well even now
    CAST(EVALUATE('TO_CHAR(%1,%2)' AS CHAR,ROUND(("table1"."QTD Actuals")/1000,0) ,'$9,999,999,999,999,990') AS CHAR)

    I had to use Case and CAST functions to achieve the same logic. I have raised a TAR with Oracle for this issue. Still waiting to hear from them. Using Case and CAST achieved the result but since there is a bug in 10.1.3.4.0 where download will fail if the query generated is more than 64kb, we are upgrading to 10.1.3.4.1.

  • The functions in Teststand "express browser dialog"

      Teststand provides several functions in Teststand "express browser dialog" to facilitate calculations. For example, I can use the function of "SetNumElements" to get the size of certain arrary. However, compared with in CVI, it seems that that's far away from engough.For example, there's no functions like advanced analysis library. 
      I'm wondering whether Teststand has provided much more functions than what are already listed in "express browser dialog", if yes, where can I get a reference manual to find the functions that I need.
      In order to make it clearer, the meaning of ""express browser dialog" is shown in attached file.
    Thanks a lot!
    Jacky
    Attachments:
    screenshot.gif ‏16 KB

    I want to comment that Dennis is exactly right about the intent of TestStand.
    TestStand is meant to connect and augment code you write in LabVIEW, CVI, and/or Visual Studio, not to replace it. Also, what he refers to as putting functionality in a "custom step" can mean just calling a VI, DLL, server, or assembly from a TestStand step, not necessarily the similarly named but more involved process of creating a custom step type. 
    Custom step types are good for wrapping a function or VI with a user friendly configuration dialog to facilitate re-use. However, in many cases it is more than adequate to simply passing arguments to a code module you call directly.
    It is certainly true that having a large number of code module files can make it more difficult to move a sequence without forgetting to include one of its dependencies. The TestStand deployment tool is designed to help mitigate this problem by identifying dependencies and packaging them all into one directory or installer.

  • Cannot function ship the following expression: Evaluate

    hello
    i used a db function in rpd
    EVALUATE('X.F_REPLACE_NEG_VAL_TO_ZERO(%1)' AS DOUBLE PRECISION , "Stock"."Fact - Inventory"."Vol")
    the functions purpose is to put to zero the measure in case its <0
    when i use this measure in answers it works fine; however when i add a measure from another facts table into the report i get the following error:
    "Cannot function ship the following expression: Evaluate( X.F_REPLACE_NEG_VAL_TO_ZERO(%1),D902.c6) "
    this is a multifacts area, the dimensions used in the report are common for both facts tables (report runs fine with either measures from facts table 1 or from facts table 2); only error is when i put both measures together;
    i went through many threads here but could not find any solution that could be applied to above
    id appreciate any suggestions
    thanks
    rgds

    hello,
    i ran some more tests and apparently this is not related to this particular function i.e. even if i use
    evaluate('to_number'(1%)','column') it still throws an error
    can evaluate be used in multifacts areas?

  • Error while using Evaluate function

    Hi ,
    I am using the following expression in the criteria tab in order to get first value for every customer order by date:
    EVALUATE('FIRST_VALUE(%1) OVER (PARTITION BY %2  ORDER BY %3)' AS INTEGER, "Fact - Customer SubLedger"."TRANSACTION AMOUNT",Customer.CUST_ACCOUNT_NUMBER,"GL Date".DAY).
    When I try to execute the report it throws following error :
    *[nQSError: 42015] Cannot function ship the following expression: Evaluate( FIRST_VALUE(%1) OVER (PARTITION BY %2 ORDER BY %3),D1.c4, D1.c2, D1.c13)*
    Can anybody help me with this? Where am i going wrong?
    Regards,
    Vikas

    Hi Kishore,
    I am using the exactly same formula which you have mentioned here still it is giving me the same error.
    EVALUATE('First_value(%1) over (partition by %2 order by %3)' AS  DOUBLE , "Fact - Customer SubLedger"."OPENING BALANCE",Customer.CUST_ACCOUNT_NUMBER, "GL Date".DAY)
    Error : *[nQSError: 42015] Cannot function ship the following expression: Evaluate( First_value(%1) over (partition by %2 order by %3),D909.c9, D909.c3, D909.c14)*
    Can't say why it is behaving like this.
    Anyways thanks all of you for your help.
    May be I am going wrong somewhere else.I will try to solve this issue by myself.
    Once again thanks to all of you.
    Regards,
    Vikas

  • Best practices on using EVALUATE functions

    hi, experts,
    I wanna know what is the best practices on using EVALUATE functions on obiee (calling oracle user defined functions)
    I found that if I use evaluate functions in Answers,
    obiee will construct a sql behind and then execute.
    sometimes, obiee contructs some unexpected sqls, and returns errors.
    so, is it better to use EVALUATE functions in logical columns ?
    thanks

    EVALUATE('DB_Function(%1)' as returntype, {Comma separated Expression})
    even when used in Logical columns, its gonna fire the same sql.

  • Evaluate function doesn't work with Static values

    Hi All,
    I have been trying to call a evaluate function and have been successfully in calling it..but i face problem when i pass any static values to it...
    For eg
    when i try calling the function using one of the columns...it works fine
    Evaluate('dbo.Hello(%1)',"Dim table_name"."Department" )
    the function normally changes it to upper case.so i get all the value in the column in department in upper case.
    but when i call any static value like
    Evaluate('dbo.Hello(%1)','hello') it throws the following error..
    [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42015] Cannot function ship the following expression: Evaluate( dbo.Hello(%1),'hello') . (HY000)
    Can any one please help me in this
    Regards
    SK

    Which version of Jdev are you using? What are the results you are getting?

  • Evaluate function error! how to use it properly?

    Hi,
    I used evaluate function to use a user-defined stored function present in my DB. But I ended up with this error.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtExecute: select distinct T119198.BCREFNO as c1, T119198.MATURITY_DATE as c2, T119198.BILL_DUE_AMT as c3, test_eval('"Contract BC Parameters Fact"."Bill Amt Lcy"') as c4 from BCTBS_CONTRACT_MASTER T119198 /* BC_BCTBS_CONTRACT_MASTER */ order by c1, c2, c3, c4. [nQSError: 17011] SQL statement execution failed. (HY000)
    I used the following evaluate function in my report under Edit Column Formula of the particular field.
    EVALUATE('test_eval(%1)','"Contract BC Parameters Fact"."Bill Amt Lcy"')
    The test_eval function in my DB takes one parameter of type number and returns a number. The "Contract BC Parameters Fact"."Bill Amt Lcy" field is of DOUBLE type as found in BMM layer.
    I wish to know if I am right by placing the evaluate function in report or should I use it in BMM layer? Can I get anybodies assistance in knowing how to arrive at using a DB user-defined function in a report.
    Regards,
    The MasterMind.

    hi,
    This is the syntax
    *EVALUATE('DB_Function(%1)' as returntype, {Comma separated Expression})*
    Please check this post
    Re: Syntax for Evaluate function in OBIEE

  • Evaluate Function in case when

    hi,
    i want to use evaluate function in case when statement.My req is
    if report_date=8/31 and sales_qty>30....show 1
    if report_date=7/15 and sales_qty>39...show 2..
    in the formula section i am using
    case WHEN "Fact- table"."Report  Date"=evaluate('to_date(%1%2)',"Column_name",'DD/MM
    /YYYY')) AND "Fact-table"."Sales_qty">30 THEN '1'  ELSE '0' END Report date data type is date only...Its giving an error date format is not supported
    Please help me out!!

    hi,
    thanks for u r quick response,i tried the code what u sent by its giving the error
    A general error has occurred. [nQSError: 42015] Cannot function ship the following expression: Evaluate( to_char(%1,%2),cast(D1.c7 as DATE ) , 'MM/DD/YYYY') ADa.....
    I tried in sql its giving correct results
    SELECT * FROM table WHERE report_month=To_Date('15/09/2009','dd/mm/yyyy')
    how to use the same in obiee?
    thanks
    Edited by: saichand on Oct 26, 2009 3:17 PM

  • OBIEE 11g EVALUATE function working fine with Administrator but

    Hi,
    We have a report with EVALUATE function , which is working fine with Administrator User but when we run for other users its giving following error.
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 42015] Cannot function ship the following expression: Evaluate( COUNT(%1) OVER (PARTITION BY (%2)),D901.c1, D901.c2) .Please have your System Administrator look at the log for more details on this error. (HY000)
    Is there any parameters that we have to set for the user level to use Evaluate ?
    Thanks,
    Raj

    You can create a compound key of Cat + SubCat (concatenation in a logical column is a quick win) which will render the SubCats unique and assign that as the logical level key:
    SubCat:
    A-Basic
    A-Value Add
    A-High
    B-Basic

  • Evaluate Function Error

    Hi All,
    I have an issue with the evaluate method,I am using a pivot view to show the report. Column contains the following formula
    '<a>' || EVALUE('TO_CHAR(%1,%2)' as VARCHAR(10), table1.AmountSold, '9,99,999') || '</a>'
    It gives the following error
    Cannot function ship the following expression: Evaluate(TO_CHAR(%1,%2),D902.c3,'9,99,999') .(HY000)
    Please provide the solution for this issue

    Not enough information from you.
    Search forum with cannot function ship the following expression and evaluate keywords.
    This error is very specific, it depends on input parameters inside it, other columns and in Answers, etc, see this thread with example:
    Re: evaluate function with 2 input parameters
    Reards
    Goran
    http://108obiee.blogspot.com

  • Can we use Evaluate function in Prompt

    Hi all
    Can we use Evaluate Function in Dashboard Prompt?
    I need some exposure on how to use it.
    I am working on a HRMS-OLTP Source where I need to work with Oracle Functions from OBIEE.
    IF somebody can tell me that, It will be a favour for me....
    ThanQ
    Anand V

    Hi All,
    Here's an example of how to use evaluate. This use calls the Oracle TO_DATE function: EVALUATE('TO_DATE(%1,%2)' as DATE, '03/03/2009', 'MM/DD/YYYY')
    Here's how it works: EVALUATE( '<FUNC>' AS <DATATYPE>, VALUE1,VALUE2,etc)
    FUNC) Is the syntax for the function you are calling. Any parameters have to be replaced by %<number>, where number refers to the order in which you specify your parameters.
    DATATYPE) The datatype that the function will evaluate to. In this case, DATE.
    VALUE1) The latter part of the formula is a comma separated list of all the parameters used in the function. In this case, it's the date I want to cast
    VALUE2) This is the second parameter. You need as many as you referenced in your function. In this case, it's the date format.
    Good luck and if you found this post useful, please award points!
    Best regards,
    -Joe

  • Can we use Evaluate Function in Dashboard Prompt

    Hi
    Can anybody tell me
    Can we use Evaluate Function in Dashboard Prompt.
    If yes...How
    Thanks in Adv

    Yes ! You Can!
    while creating the dashboard prompt, under "Show" pick SQL results and you write the SQL statement and include the EVALUATE function.
    I have several such examples. Most of of dashboard pages are parameter driven.
    1. 1st paratmeter - users specify the dates
    2. 2nd parameter - constrains the results for the period specified in 1st paramter and my SQL for 2nd paramter looks like this -
    SELECT table1.column1
    FROM table, datedim1, table1,table2
    WHERE datedim1.date BETWEEN EVALUATE( 'TO_DATE(%1,%2)','@{presentation variable1}','dd/mm/yyyy') AND EVALUATE('TO_DATE(%1,%2)', '@{presentation variable 2}','dd/mm/yyyy')
    HTH
    Mahesh

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

Maybe you are looking for

  • In XML form builder data schema not clickable

    Hi , I have installed JRE version 1.6.0_07. When i click on xml foms builder ,it gets opened but when i click on data schema it's not clickable but icon is displayed next to data schema.I am not able to create any node in data schema. Regards. Adity.

  • W520 with Mini Dock Plus Series 3 won't detect Dell U2412M Monitor

    I have a W520 Thinkpad with a Mini Dock Plus Series 3 with USB 3.0. Until this morning, I was able to use it with my two external monitors connected via DVI to the Mini Dock. The two monitors I have are: Acer V243H Dell U2412M The Acer works fine reg

  • Powerbook g4 17" wont start up

    Hey there. I was having problems with my internal super drive, so I just put in a new one, but now the laptop won't startup. I hit the power button and nothing happens. I purchased the superdrive from ifixit.com, and followed their instuctions to the

  • Jdev 10.1.2: Using environment variable in library path?

    Hi, I'm trying to use Maven2 for my build process besides JDeveloper for maintaining the code. MAven puts all necessary jars in a local repository, in my case in the folder: 'C:\Documents and Settings\PAlma\.m2\repository'. Now if I want to compile t

  • Planning customer customer number is not assigned to Sales Organization

    Dear Forum members,    I get the above error in the Marketing planner. I have maintained the Sales organization in the Sales Area data for the Business Partner for which I get this error. How can I get rid of this error? Regards, Sowmiya