Can't fetch JSON value and extract to parameter

I need to extract this specific JSON-field into a parameter for my performance test in Visual Studio:
"ExamAnswerId": "757a3735-e626-412b-934c-e577c6963d51"
the problem occurs when I try to do this manually by right clicking the response and click "add extraction rule". The text is split up into 3 different rows with lots of unreadable numbers next to it like this: "0x00000000 7B 22 45 78 61 6D 41
6E 73 77 65 72 49 64 22 3A {"ExamAnswerId": 0x00000010 22 37 35 37 61 33 37 33 35 2D 65 36 32 36 2D 34 "757a3735-e626-4
This will sound dumb, but I somehow need to extract 3 different parameters, only because I can't copy/paste it -- and this is also where I think I fail.
the ExamAnswerId is important for me to fullfill another webrequest later on, but I can't seem to pass it on properly.
all input greatly appreciated !

Hi Vegardontic,
   There is a few ways to go about extracting JSON from a response. If you know the left and right boundary's such as the example you gave with ExamAnswerId you can always manually add a text extraction rule as seen below. To do this
set the starts with field equal to "ExamAnsersId": "" keep in mind the extra quotes and the ends with field equal to """. This should pull the items located in that specific JSON location.
A more advanced way of approaching this would be to parse the JSON which is being returned. I have included a few URL's which will help you if you decide to choose that route. 
http://blogs.msdn.com/b/ambhrin/archive/2011/05/20/parsing-json-to-extract-values-for-further-parameterization-amp-correlation-test-automation-with-visual-studio.aspx
http://apmblog.compuware.com/2009/04/20/how-to-test-jquery-enabled-apps-using-json-with-visual-studio/
Regards,
Matt M.

Similar Messages

  • Can we assign two values to the same parameter? If yes how? For details ple

    Can we assign two values to the same parameter? If yes how? For details please go through the following SAP related program.
    Here I need to print 2 queries using the same parameter "QUERY" the value assigned to this parameter(query) is REPORT_TEST1. I want to assign one more value to this Parameter. Is is possible? This question may sound stupid if it is not possible please kindly reply.
    I want to do this to print two documents(values) with a single command (parameter)
    Anybody please help quickly,
    Now, I have 2 tables from different queries. I have a print (HTML written) option in my WEB Template
    JAVA PROGRAM:
    <param name="QUERY" value="REPORT_TEST1"/>
    function PrintReport(typePaper) {
    document.title ='Report';
    if (typePaper == "0")
    {var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('39') + '&qtitle=' + escape(document.title);};
    if (typePaper == "1")
    {var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('52') + '&qtitle=' + escape(document.title);};
    CurrentReportName += '&ASOFDATE=' + escape(AsOfLabel.innerText);
    var openCMD='<SAP_BW_URL>';
    openCMD += '&DATA_PROVIDER=REPORT_TEST1&TEMPLATE_ID=DPW_PRINT_PAGE&CMD=RELEASE_DATA_PROVIDER';
    openCMD += CurrentReportName;
    openWindow(openCMD,'MainTitleNow',800,600);
    The data provider here is REPORT_TEST1. Now it only prints the corresponding data for the data proviedr 1 i.e., REPORT_TEST1. I have a second table whose data comes from the data provider 2 when i use this HTML to print I want the second table contents from the data provider 2 (REPORT_TEST2)also to be printed simlutaneously.
    Please help.
    THANX A LOT,
    SRINI

    Hi,
    Try assigning two values seperated by a delimiter ( say '|') to the same parameter.
    In the function get the parameter value and seperate the values using the same delimiter.
    <param name="QUERY" value="REPORT_TEST1|REPORT_TEST2"/>
    Regards,
    Uma

  • Can we assign two values to the same parameter? If yes how?

    Can we assign two values to the same parameter? If yes how? For details please go through the following SAP related program.
    Here I need to print 2 queries using the same parameter "QUERY" the value assigned to this parameter(query) is REPORT_TEST1. I want to assign one more value to this Parameter. Is is possible? This question may sound stupid if it is not possible please kindly reply.
    I want to do this to print two documents(values) with a single command (parameter)
    Anybody please help quickly,
    Now, I have 2 tables from different queries. I have a print (HTML written) option in my WEB Template
    JAVA PROGRAM:
    <param name="QUERY" value="REPORT_TEST1"/>
    function PrintReport(typePaper) {
    document.title ='Report';
    if (typePaper == "0")
    {var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('39') + '&qtitle=' + escape(document.title);};
    if (typePaper == "1")
    {var CurrentReportName = '&?mp=U&ptot=1&rtot=0&psize=' + escape(typePaper) + '&fsize=' + escape('52') + '&qtitle=' + escape(document.title);};
    CurrentReportName += '&ASOFDATE=' + escape(AsOfLabel.innerText);
    var openCMD='<SAP_BW_URL>';
    openCMD += '&DATA_PROVIDER=REPORT_TEST1&TEMPLATE_ID=DPW_PRINT_PAGE&CMD=RELEASE_DATA_PROVIDER';
    openCMD += CurrentReportName;
    openWindow(openCMD,'MainTitleNow',800,600);
    The data provider here is REPORT_TEST1. Now it only prints the corresponding data for the data proviedr 1 i.e., REPORT_TEST1. I have a second table whose data comes from the data provider 2 when i use this HTML to print I want the second table contents from the data provider 2 (REPORT_TEST2)also to be printed simlutaneously.
    Please help.
    THANX A LOT,
    SRINI

    Hi,
    Try assigning two values seperated by a delimiter ( say '|') to the same parameter.
    In the function get the parameter value and seperate the values using the same delimiter.
    <param name="QUERY" value="REPORT_TEST1|REPORT_TEST2"/>
    Regards,
    Uma

  • What is the values and meaning for parameter TCLAS in functions

    what is the values and meaning for parameter TCLAS in functions like
    HR_INFOTYPE_OPERATION
    regards
    jan

    Hi Jan,
    Good Morning,
    In TCLAS,
    A, B , T will be there.
    A- Master data and time data.
    B- Applicant data.
    T- Shift Schedule.
    So, here we can say the default value will be integrated according to the above ABT.
    Means in the feature ABKRS, if you give the default values for all the three, your payroll area will appear in Master Data and Time data. And in recruitment ( Appicant data ) and work schedules. Means you are getting ingrated to all the three.
    And you can observe the feature PINCH also.
    If you dont want to get integrate with Master data, then dont give the default value under the A- Master date and Time data. And if you want to get integrate with Recruitment , then give the default value under B.
    I think u got the clear idea about TCLAS.
    Dont forget to give the points
    Thanks in Advance
    Cheers
    Vijai

  • How can I set default value to a transient parameter  in the VO

    I have created a transient parameter in the VO, which is type of boolean.
    When I try to input the "true" or "True" or "Y" in the 'default value',
    and then running the programm, but all failure.
    so I don't know how can i do.
    Genuinely waiting for you help, thanks in advance.

    Hi Sumury,
    First of all you could check if this transient attribute is read only. to check this, edit the VO and select the transient attribute under the Attributes tab. Then verify if it is marked as "Updateable Always" on the right-hand section.
    If it is updateable, then try setting the default value on the VO Implementation class: open the xxxVOImpl class, go to the transient attribute's setter (setxxx()) and change it to:
    <code> if (getXXX() == null) setAttributeInternal(XXX, "Y");
    else setAttributeInternal(XXX, value);</code>
    This might work. If it does not, then please post the exact message you are receiving when running the app.
    Hope this helps!
    Thiago

  • How to fetch Junk values and its columns dynamically

    Hello,
    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..
    Thanks in advance..

    Can anyone help me in writing a procedure/dynamic SQL to fetch the column where the junk values appears and its value. Eg: If emp table contains ID and Name columns, and ID column contains junk values, the result should be the Id column and the junk value/s. It should be dynamic because next time if the other column contains junk values(like $,%...), the query should display the other column too..1. define "junk" values.
    2. usually it does not matter what values are in ID, because it is used internally by application, to maintain uniqueness or relations, not having any semantical meaning. End users usually should not see IDs, such IDs are generated automatically. There is no need to cleanse them from "junk" values.
    3. If you made a typo, and you are looking for "junk" values in Name column, it is a different story. You can use TRANSLATE to search such values, as already advised, translating all "junk" characters to one "junk" character and searching for the latter.
    select id, name from T where translate(name,'?@#$%^<>','~~~~~~~~~') like '%~%';
    Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 11:40 AM

  • Is there a program or app where I can take a scanned document and extract the text to transfer to a Pages document so I can alter it in Pages?

    I have an old copy of a contract I used to use. I no longer have the digital copy and need to rewrite the contract to update it but want to use the bulk of it as it is. I do not want to have to rewrite the whole thing. Is the any software or apps that can scan this document and then transfer the text in its existing layout onto a pages document to allow me to make the neccesary changes?

    Here's one you can check out to see if it fits your needs. There's a free version that will OCR one page at a time and a modestly priced version that has no limitations.
    https://www.macupdate.com/app/mac/33501/pdf-ocr-x
    Walt

  • Can I set the values number of the parameter LOV?

    Hi.
    Can I set a number of values in a report prompt LOV? Now is 5 values (All + 4 values of the query). I would like to have 4 o 3 values...
    Thank you, bye.
    R.

    Can you please restate your question? It is not clear you would like to get
    regards
    Jorge

  • How can I get the values on Xaxis and Yaxis?

    Hi, I would like to get the values that are on the axis X and Y or to get the base value and the ticks interval for calculating the values.

    You can get the base values and intervals via the following properties:
    XAxis.MajorDivisions.Base
    XAxis.MajorDivisions.Interval
    XAxis.MinorDivisions.Base
    XAxis.MinorDivisions.Interval
    YAxis.MajorDivisions.Base
    YAxis.MajorDivisions.Interval
    YAxis.MinorDivisions.Base
    YAxis.MinorDivisions.Interval
    Note that calculating the values from these properties will only work if the axis AutoSpacing property is false. Otherwise, the ticks and labels are automatically determined by the graph depending on the available space to present something that always looks nice.
    - Elton

  • Can't fetch XMLType after getting first row

    Hi - when I call OCIDefineObject in a sub function, after getting the first row of XMLType value, the program can't fetch subsequent rows and stops. If I call OCIDefineObject in the same memory space of where the fetch call locates, it works out fine. Somehow the persistency of xmldocnode can not last.
    Any clues? I can email out both working/non-working programs upon request.
    my environment is Oracle 11g on Solaris box.
    Sample Code: (fetch only the first row and stop)
    char orderNumData[4001];
    xmldocnode* xmlData = (xmldocnode *) 0;
    xmldocnode** xmlDatap = &xmlData;
    defineStr(define_orderNum, (char*)&orderNumData, 4001);
    defineXML(define_customerdata, xmlDatap );
    rc = OCIStmtExecute ( svc, stmt, err,
              1,
              0, NULL, NULL,
              OCI_DEFAULT);
    cout << "OrdNum: " << orderNumData << endl;
    displayXML (xmlData);
    while ((rc = OCIStmtFetch2 (stmt, err, 1,
    OCI_FETCH_NEXT,
    (ub4) 1,
    OCI_DEFAULT )) == OCI_SUCCESS)
    cout << "OrdNum: " << orderNumData << endl;
    displayXML (xmlData);
    void defineXML ( OCIDefine defineHdn, xmldocnode *xmlDatap )
    ociStatus = OCITypeByName( env,
    err,
    svc,
    (const text *) "SYS",
    (ub4) strlen((char *)"SYS"),
    (const text *) "XMLTYPE",
    (ub4) strlen((char *)"XMLTYPE"),
    (CONST text *) 0,
    (ub4) 0,
    OCI_DURATION_SESSION,
    OCI_TYPEGET_HEADER,
    (OCIType **) &xmltdo);
    ociStatus = OCIDefineByPos ( stmt,
    &defineHdn,
    err,
    pos,
    (dvoid *) 0,
    (sb4) 0,
    SQLT_NTY,
    (dvoid *) 0,
    (ub2 *)0,
    (ub2 *)0,
    (ub4) OCI_DEFAULT );
    ociStatus = OCIDefineObject( defineHdn,
    err,
    (OCIType *) xmltdo,
    (dvoid **) xmlDatap,
    &xmlSize,
    (dvoid **) &indp,
    (ub4 *) 0);
    Working one:
    Instead if I call OCITypeByName, OCIDefineByPos,
    and OCIDefineByPos right before the OCIStmtExecute() in the main,
    then all results can be returned.
    OCITypeByName(...)
    OCIDefineByPos(...)
    OCIDefineObject(...)
    rc = OCIStmtExecute ( svc, stmt, err,
    1,
    0, NULL, NULL,
    OCI_DEFAULT);
    cout << "OrdNum: " << orderNumData << endl;
    displayXML (xmlData);
    while ((rc = OCIStmtFetch2 (stmt, err, 1,
    OCI_FETCH_NEXT,
    (ub4) 1,
    OCI_DEFAULT )) == OCI_SUCCESS)
    cout << "OrdNum: " << orderNumData << endl;
    displayXML (xmlData);
    Thanks,
    Terrence

    void defineXML ( OCIDefine defineHdn, xmldocnode *xmlDatap ) { ...
    ociStatus = OCIDefineObject(
    defineHdn, err, (OCIType *) xmltdo, (dvoid **) xmlDatap,
    &xmlSize, (dvoid **) &indp, (ub4 *) 0);
    Instead if I call OCITypeByName, OCIDefineByPos,
    and OCIDefineByPos right before the OCIStmtExecute()
    in the main, then all results can be returned.I ran into this issue myself (was going nuts until a smarter colleague open my eyes on the issue). The problem is that you passing addresses of local variables in defineXML for xmlSize and indp, when the addresses you pass must remain valid for the whole fetch. (xmlSize is not written to apparently, by indp is for sure, so you are writing/corrupting your program stack...)
    To resolve this, I use a stack allocated helper struct whose lifetime extends the fetch, and which is referenced in the bind_object method. --DD
    struct ObjectBindInfo {
        void* p_value;
        void* p_indicator;
        ub4 value_size;
        ub4 indicator_size;
    static void insert_one_object(ub4 id) { ...
        sql_point pt(id);
        ObjectBindInfo pt_info(pt, &pt.indicator_);
        stmt.bind_object(conn, 2, pt, pt_info);
    ... void Statement::bind_object(
        Connection& conn, ub4 position, ..., ObjectBindInfo& obj_info
        // WARNING: Addresses passed to OCIBindObject MUST still be
        // valid after OCIStmtExecute, so cannot be addresses to local
        // (stack) vars. Thus the use of ObjectBindInfo...
        checkerr(
            OCIBindObject(
                bind_hndl, errhp(), tdo,
                (void**)&obj_info.p_value,     &obj_info.value_size,
                (void**)&obj_info.p_indicator, &obj_info.indicator_size
            errhp()
    }Of course, you've noticed that I talk about binds above, but the fact that you need to provide non-local var addresses to OCI applies to defines as well. --DD
    Message was edited by: ddevienne

  • DomHandle can not fetch special characters like , or &......

    hi friends......
    I'm using following packages...........
    When I store special characters....like < , > or &......DomHandle can not fetch the values from xml file......why so??? Anybody faced same problem??????
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.w3c.dom.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;

    it actually converts < & > to < & > and so
    on.......but still when it again tries to read
    it....it fails & throws exceptionDepending on what is to be accomplished, I had an issue earlier today and this is how I solved it:
    I needed to put a url with post data:
    Something
    Now to do this we can split this up in parts, tried writing out everything using CDATA and a few other things. But the Damn <'s and >'s would get converted into &lt; and &gt;
    So I did this:
    <a>
    <xsl:attribute name="href">
    <![CDATA[bob.jsp?something="]]><xsl:value-of select="@SomeAttrib"/><![CDATA["]]>
    </xsl:attribute>
    Something</a>
    Hope this helps

  • How to get values and not index in case of SOC?

    I have created a SOC and i need the values in the bean on valuechange event which are present in the dropdown(i.e 20,50,100). But in this case instead of value me getting the index value(i.e 0,1,2)
    How can i get the values and not the index value.
    Query which returns the value is as follow:
    SELECT Id,CODE FROM table_name WHERE TYPE = 'ROWS' AND NVL(DISABLED_FLAG,'N') !='Y' ORDER BY TO_NUMBER(CODE)
    <af:selectOneChoice value="#{bindings.Row.inputValue}"
    label="#{uiBundle.ROWS}"
    required="#{bindings.Row.hints.mandatory}"
    shortDesc="#{bindings.Row.hints.tooltip}"
    id="soc5" autoSubmit="true"
    valueChangeListener="#{pageFlowScope.Bean.rangeChanged}"
    binding="#{pageFlowScope.Bean.row}">
    <f:selectItems value="#{bindings.Row.items}" id="si5"/>
    </af:selectOneChoice>
    Thanks in advance.

    See if it helps:
    http://mjabr.wordpress.com/2011/03/19/reading-the-selected-value-of-a-select-list-in-java/

  • How to fetch the value of tabular form item in javascript

    Hello all
    I want to do some calculations on the value entered by the user in the textfield of a tabular form, how can I fetch the value of tabular form item in the javascript?
    I am using normal tabular form, not using apex_item tabular form.
    I can pass the current textfield value to the function using "this" as a parameter, but how can I fetch the value of other rows of that same column?
    Thanks
    Tauceef

    Hi Alistair
    jQuery is still not working, but I got it done through some other means, this is the code:
    function total(pThis){
    var l_Row = html_CascadeUpTill(pThis,'TR');
    var l_Table = l_Row.parentNode;
    var l_Row_next = l_Row;
    var n_rows = l_Table.rows;
    var lInputs;
    var v1;
    var sum = 0.0;
    var temp;
    var i = 0;
    var j = 0;
    //alert(n_rows.length);
    while(j < (n_rows.length - 1))
    temp = 0;
    if(l_Row_next != null){
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    //alert(v1);
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    temp = 1;
    if(temp == 0){
    l_Row_next = l_Table.getElementsByTagName('TR')[1];
    lInputs = html_Return_Form_Items(l_Row_next,'TEXT');
    v1 = lInputs[0].value;
    sum = parseFloat(sum) + parseFloat(v1);
    l_Row_next = l_Row_next.nextSibling;
    j= j+1;
    $x('P78_TOTAL').value= parseFloat(sum);
    I am calling this function onblur event of the textfield.
    Still I am having one problem, I want to perform this calculation on load of the page also, how can I do that? because while calling onblur of the textfield I can pass that textfield to this function but on onLoad how I will pass the textfield to call this function so that I will be able to get the textfield value in the function?
    there may be some rows already existing, so I want the total of the existing rows to be displayed in my P78_TOTAL textfield that is why I need to do this calculation on onLoad of the page.
    Thanks
    Tauceef
    Edited by: Tauceef on Jul 8, 2010 4:57 AM

  • How to set default value and bg color of cross tab cell?

    Hi all
    Which way can I set default value and background color for a crosstab cell where there are no any data?
    I try to pass it in following way
    if isnull(CurrentFieldValue) then
    But is has no effect.

    Hi,
    If your field is numeric
    if currentfieldvalue =0 then cryellow else crnocolor
    if the field is numeric but you don't see the 0 check check if : Suppress if zero is ticked in the Number format tab.
    Regards

  • Report value and batches

    Need to show report which shows stock value and levels on a certain period (previous) by batch numbers.
    Report MMBE shows current stock levels per batch.
    Report MB5L shows stock value on a certain period (previous) but with no batch information
    Is there any standard reports which you can see all stock values and levels for the previous period on batch?
    Thanks

    yes there is a standard transaction, TCODE : MB5B.
    Sharath kumar R

Maybe you are looking for