How to assign an expression to a statement Step in TestStand automatically?

Hi,
I am using VC++ and I am trying to create a statement step inside a SequenceFile already created. I can actually create my Statement type of step and insert it at the right place. Unfortunately, I can't find a way to set the Expression for this step. How can I do it?
Here is what I tried:
TS:tepPtr step = engine->NewStep(TS::NoneAdapterKeyName, TS:tepType_Statement);
// Assign its name to the step
_bstr_t calledName(stepName);
step->put_Name(calledName);
// Get all the sequence file variables into a PropertyObject
// TS:ropertyObject variables = TS::Execution.GetFileGlobals ( seqFile );
// Expression construction
_bstr_t expression("resourceHeader=ResStr(");
expression += _bstr_t(id_ptr) + ")";
step->CustomActionExpression.Assign(expression);
I get the expressions created but nothing in the Expression field.
NB: I use TS 4.0
Any hints are welcome.
- Eric

Works fine.
But as you are looking familiar with the kind of programming I do, can I ask another question?
There it is...
I highly inspire myself from a solution found on a discussion. I would like to create SequenceFile Global variables for a SequenceFile object but can't get it to work. Here is the code that should do it:
TS:equenceFilePtr CreateSeqFileGlobals(TS:equenceFilePtr seqFile) {
TS:ropertyObjectPtr propObjPtr = seqFile->AsPropertyObject();
propObjPtr->SetValString("Data.FileGlobalsDefaults.resourceHeader", 1 ,""); // resourceHeader
propObjPtr->SetValString("Data.FileGlobalsDefaults.resourceFail", 1, ""); // resourceFail
seqFile->IncChangeCount(); // Signify the file changed
return(seqFile);
Any idea why this doesn't do what I expect it to do?
Regards,
- Eric

Similar Messages

  • [b]how to assign whole expression to a temporary variable[/b][/b]

    Good afternun. Can someone help me how to assign the whole expression to a temporary variable. The expression is
    id = catDao.findByPK(info.getCategoryId());
    Thanks in advance and may I know how to validate the temporary variable?

    You can do this with an anonymous class and a command pattern.
    interface LazyEval {
       public Object getValue();
    LazyEval le = new LazyEval() {
      public Object getValue() {
        return catDao.findByPK(info.getCategoryId());
    id = le.getValue();However, this sound like a solution to a problem which should be done another way.

  • How to assign an expression to an array of strings

    i'm assuming this is simple, but have searched the forums and googled and a can't seem to make this work
    all i need to do is create an element in the "to" array
    here's info from the wsdl:
    8< snip -------
    <xsd:complexType name="ArrayOfString">
    <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    8< snip -------
    <message name="sendmsgInput">
    <part name="session_id" type="xsd:string" />
    <part name="api_id" type="xsd:int" />
    <part name="user" type="xsd:string" />
    <part name="password" type="xsd:string" />
    <part name="to" type="tns:ArrayOfString" />
    8< snip ---------
    here's an example of the XML i need to send:
    <to xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]">
    <item xsi:type="xsd:string">2799912345</item>
    <item xsi:type="xsd:string">27999123134</item>
    </to>
    i'm having trouble making the "Assign" activity work using copy, append or insert-after
    i'm new to BPEL and i suspect an expert can whip out the copy XML for this in no time
    if you're that expert, please reply
    thanks
    brett

    sorry about nto givng a detailed reply to your question but i hope this link would help you out.
    http://www.oracle.com/technology/products/ias/bpel/pdf/orabpel-Tutorial3-DataManipulationTutorial.pdf

  • How do you effectively use if,for, type loops in TestStand. Do you have to use the goto command or is there a way of writing actual c type code (perhaps using the statement step in teststand) with the variables allready declared.

    Thank you
    Arik

    I assume your loop is more than just one step. You should use the 'Loop Options' for a single step.
    For looping on a group of steps, you can place them all in a sub sequence and then set the 'Loop Options' for the 'SequenceCall' step to set up your looping conditions. Pass values to and from the sub-sequence by Parameters.
    You can keep the loop inline with the rest of your sequence by using 'Goto' or using 'Goto destination' in the Post Actions tab of the condition step.
    Using a sub sequence will keep it easier to read and maintain.

  • How can I change the name of the step name on the fly w/o using activeX API

    I would like to change the name of a step just for the report generation. The sequence file should not be changed. I was able to change the step name with the activeX API, just looking for any other solutions that wouldn't involve adding another step.

    Hi,
    since the report generation is done from the ResultList, you coudl simply alter the data stored in the Locals.ResultList (which ever is the appropriate result element in here) to reflect what you want the step name to appear as.
    This could be done through an expression, or a statement step.
    e.g. Locals.ResultList[0].TS.StepName = "New name"
    Just an alternative.
    S.
    // it takes almost no time to rate an answer

  • How re-assign old bank statements to a new bank account?

    Hi Folks,
    Actually, we have a bank account and use to enter bank statements for the same account for reconciliation purpose. But later we found some mistake in that bank account "GL accounts", so we tried to update the problematic GL account, but Oracle is not allowed us to do so. Hence, we have entered end-date for the same bank account and created one more new account. Now, how can we re-assign all those old bank statements to the new bank account? Can any expert help us in this issue?
    Thanks in advance.

    If you have reached the limit of 5 authorized PCs, you can always use the deauthorize option that is available for one time each year.  See this article for more information.
    iTunes Store: About authorization and deauthorization
    B-rock

  • How to assigne multiple value in key of read table

    Hi gurus,
    I want read table xxxx with key field1 = ' xxx' or field1 = 'yyy'.
    how to assign multiple value as key for the same field while reading internal table.
    Regards
    sagar

    Hi ,
    You can loop the internal table like
    loop at  <table xxxx> where field1 = ' xxx' or field1 = 'yyy'
    or you can write two read statements to read the internal table in wrk area.
    read table   <table xxxx> with key field1 = ' xxx'.
    if sy-subrc <>0
    read table   <table xxxx> with key field1 = 'yyy'.
    if sy-subrc = 0
    endif.
    else.
    do your data processing.
    endif.
    Thans.

  • Execute the expression in select statement

    CREATE TABLE TEST1
      OFFICE_PRODUCTS     NUMBER,
      OFFICE_ELECTRONICS  NUMBER
    Insert into TEST1 (OFFICE_PRODUCTS, OFFICE_ELECTRONICS) Values(1, 0);
    COMMIT;
    CREATE TABLE TEST2
      EXPORT_FIELD_NAME         VARCHAR2(100 BYTE),
      EXPORT_COLUMN_EXPRESSION  VARCHAR2(100 BYTE)
    Insert into TEST2
       (EXPORT_FIELD_NAME, EXPORT_COLUMN_EXPRESSION)
    Values ('A1', 'least(OFFICE_PRODUCTS, OFFICE_ELECTRONICS)');
    COMMIT; I want to be execute the expression should run in select statement how to do?
    and tried as like below,it's not working.
    select (select EXPORT_COLUMN_EXPRESSION from test2 where EXPORT_FIELD_NAME='A1') FROM TEST1;

    968892 wrote:
    CREATE TABLE TEST1
    OFFICE_PRODUCTS     NUMBER,
    OFFICE_ELECTRONICS  NUMBER
    Insert into TEST1 (OFFICE_PRODUCTS, OFFICE_ELECTRONICS) Values(1, 0);
    COMMIT;
    CREATE TABLE TEST2
    EXPORT_FIELD_NAME         VARCHAR2(100 BYTE),
    EXPORT_COLUMN_EXPRESSION  VARCHAR2(100 BYTE)
    Insert into TEST2
    (EXPORT_FIELD_NAME, EXPORT_COLUMN_EXPRESSION)
    Values ('A1', 'least(OFFICE_PRODUCTS, OFFICE_ELECTRONICS)');
    COMMIT; I want to be execute the expression should run in select statement how to do?
    and tried as like below,it's not working.
    select (select EXPORT_COLUMN_EXPRESSION from test2 where EXPORT_FIELD_NAME='A1') FROM TEST1;
    Your problems are many...
    a) it's very poor design to be storing expressions or sql statements or any 'executable' style code as data in the database.
    b) what you're storing is a string of characters. Oracle isn't going to miraculously know that that is some expression that has to be evaluated, so why should it decide to treat it as such?
    c) this poor design can lead to security issues especially around SQL injection.
    d) to actually perform what you want would require you to build a dynamic SQL statement and then execute that using EXECUTE IMMEDIATE or DBMS_SQL (or for a 3rd party client, a Ref Cursor), but then there are numerous issues around doing dynamic SQL, aside from SQL injection, in that you are producing code that is not validated at compile time and can thus lead to bugs showing only at run-time and sometime only under certain conditions; the code is harder to maintain; the code can potentially be avoiding the use of bind variables, impacting on resources and performance on the database; the final query can be difficult to know just from reading the code, making further development or debugging a pain in the posterior. Essentially, dynamic SQL is considered very poor design and is 99.9% of the time used for the wrong reasons.
    So, why are you trying to do this? What is the business requirement you are trying to solve?

  • How to call user fuction in select statement.

    hi,
    i am facing some problem.How to call user functions in select statement.please send me answer with example.
    Thanks
    Gopal

    Locations to Call User-Defined Functions
    • Select list of a SELECT command
    • Condition of the WHERE and HAVING clauses
    • CONNECT BY, START WITH, ORDER BY, and GROUP
    BY clauses
    • VALUES clause of the INSERT command
    • SET clause of the UPDATE command
    Restrictions on Calling Functions from SQL Expressions
    To be callable from SQL expressions, a user-defined
    function must:
    • Be a stored function
    • Accept only IN parameters
    • Accept only valid SQL data types, not PL/SQL
    specific types, as parameters
    • Return data types that are valid SQL data types,
    not PL/SQL specific types
    • Functions called from SQL expressions cannot
    contain DML statements.
    • Functions called from UPDATE/DELETE statements
    on a table T cannot contain DML on the same table
    T.
    • Functions called from an UPDATE or a DELETE
    statement on a table T cannot query the same table.
    • Functions called from SQL statements cannot
    contain statements that end the transactions.
    • Calls to subprograms that break the previous
    restriction are not allowed in the function.
    jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to execute an expression which is in a string

    hi
    i am facing one interesting problem
    i want to evaluate an expression like
    sin^2 (theta) * cos^2 (phi) which i am getting in string object
    something like expression entered by an user
    and i want to evaluate it in a program
    how do i do that
    i mean how to treat this string as a statement
    thanx in advance as usual

    Here's one of probably many.
    http://tp.lc.ehu.es/anonym/java/eval.html
    Google is your friend.
    http://www.google.com/search?hl=en&q=java+eval&btnG=Google+Search

  • How to assign sessionscope variable to the bind variable in Query of VO

    Hi all,
    I want to know how to assign a sessionscope variable in the binvariable of Query in VO
    My sessionscope variable holds the value of currently selected column in the table. eg:empname of the currently selected column which is in empdetails table...
    I want display the schemes available for the selected employee in the next table..The schemes are in another table named empschemes which has the empname and empschemes as column
    I have created a vo for empschemes table with bind variable 'scheme_bind'..I need to set the sessionscope variable '#{sessionScope.empname}" to the bind variable.
    Its urgent,..Pls do reply asap
    Thanks in advance
    Nasrin

    HI,
    You can use
    adf.context.sessionScope.get("YourSessionVariable")this code for assigning VO's bind variable value.write this code where you create bind variable and do not forget click on expression radio button.
    Rafat

  • How can assign the value returned from javascript to Hidden item

    Hi All,
    I have created a report with button in one column adding following code to SQL select statement like
    SELECT USER_RQST_ID, USER_RQST_DESC, RQST_DATE, STATUS, USER_ID, CNTRY_ID, KPI_LIST, YEAR_LIST, QTR_LIST, MONTH_LIST,
    PROD_LIST, FULL_PERIOD_FLG, GEN_DATE, '<input type=button value="view_list" onclick="javascript:doSubmit('||USER_RQST_ID||');">' button FROM KPI_USER_RQST;
    Then i have implemet doSubmit() function in Javascript like
    function doSubmit(req_id)
    html_GetElement('HIDDEN_ITEM')= req_id.value;
    Here HIDDEN_ITEM is the name of the item, I want to use that HIDDEN_ITEM value in PL/SQL block like...
    BEGIN
    INSERT INTO SAMPLE(KEY) VALUES(:HIDDEN_ITEM);
    END;
    But it is not working, Please help me anybody know the solution How to assign an item in javascript block function.
    Thanks,
    Neel

    Hello,
    doSubmit() is one of the built in javascript functions in apex and it's a bad idea to override it unless you know exactly what you are doing, and even then is a generally bad idea.
    change your function to this
    function mySubmit(pValue){
    $x('HIDDEN_ITEM').value = pValue;
    doSubmit();
    then your onclick will look like this notice the lack of the javascript: and the three ''' quotes to get the proper quotations for your value.
    onclick="mySubmit('''||USER_RQST_ID||''')"
    And there you go
    Carl

  • How to assign a search help

    Hi
      How to assign a search help for the particular field
    in any screen.
    By
    Prashanth

    Hi,
    **How to assign a search help for the particular field
    in any screen.
    -  insert the event PROCESS ON-VALUE-REQUEST in the program and add a field statement for the field that should trigger the F4 help. In the mdoule called from <b>PROCESS ON-VALUE-REQUEST</b>, call function module
    F4IF_FIELD_VALUE_REQUEST.
    <b>Samples code:</b>
    PROCESS ON VALUE-REQUEST.
    FIELD it_zsd00003-prctr MODULE f4_help_for_pctr.
    MODULE f4_help_for_pctr INPUT.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'ZSD00003'
    fieldname = 'PRCTR'
    SEARCHHELP = ' '
    SHLPPARAM = ' '
    dynpprog = 'ZSD00002_BRUGERKONV_LISTE'
    dynpnr = '0100'
    dynprofield = 'IT_ZSD00003-PRCTR'
    STEPL = 0
    value = '50*'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    SUPPRESS_RECORDLIST = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    TABLES
    RETURN_TAB =
    EXCEPTIONS
    FIELD_NOT_FOUND = 1
    NO_HELP_FOR_FIELD = 2
    INCONSISTENT_HELP = 3
    NO_VALUES_FOUND = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    There is <b>on more example with code</b> , just copy and paste the code and design the screen and you will be able to find ur search help.
    Find the code:
    Re: Creating customized search helps in Dialog Programming
    Hope this will help you.
    Cheers
    Sunny
    Rewrd points, if found helpful

  • How to assign select-option values to internal table

    hi all,
    how to assign select-option values to internal table
    thanks in advance.

    Hi,
    You just need to loop at your select-option field and take the values from low and high fields.
    for. e.g
    loop at s_werks .
    move:s_werks-low to <your itab>
    if not s_werks-high is initial .
    move: s_werks-high to <youritab>
    endif .
    append <your itab>
    endloop .
    OR use select statement.
    regards,
    Omkar.
    Message was edited by:
            Omkaram Yanamala
    Message was edited by:
            Omkaram Yanamala

  • How to assign FSV to Cash flow?

    How to assign FSV to Cash flow?
    Regards
    Sap Guru

    1. S_ALR_87012272 for getting in Cash Flow Statement
    2. Execute any Report
    3. Click Form button
    4. You are taken to Report Painter: Display Form
    ===>>> There is a direct T.Code FSi5 and FSi6 to get here.
    5. Edit --> Gen Data Selcn --> General Data Selection
    6. Change the FSV here
    Pls assign points.
    Cheers.

Maybe you are looking for

  • Looking for a "Where Ive Been" app

    Hey guys, Ive been looking around for an app just like "Where Ive Been" http://w3.whereivebeen.com/ Its a cool website that lets me mark off on a map where all ive been. I was hoping to get a desktop solution though. Any ideas?

  • Iphone 4S resets itself every few min - the battery drains in an hr.

    My iphone 4S is resetting every few minutes as a result the battery drains in an hour. By resetting I  mean, the lock screen would show up, then the apple sign would come up like when you start your iphone, searches for the network etc. This happens

  • BAPI_GOODSMVT_CREATE with Serial Number

    Dear Gurus, Scenario We have to transfer serialized Material from one plant to another via STO ST order --> Delivery --> PGI (with Serial Number) --> MIGO at recieving plant. For MIGO (101) movement we want to use BAPI_GOODSMVT_CREATE. Now we have tr

  • A Servere Error Occured on the Current Command, The Result, If Any, should be discarded Message (10:17:1)

    Hello I am getting Following error when I predd add button. On this add button I do Bulk Copy insertion in some of tables. I am using Linq to sql classes. At my side error is not comming. But at client side error is comming. They have more than 1 lac

  • Struts portlet data binding

    Struts project using syntax like <c:out value="${bindings.RaeCustomersView1.labels['Role']}"/> works fine unless deployed as a struts portlet. As a portlet all the bindings are null. This is a major pain !!! Has anyone any ideas.