How to set values to unniverse prompts through java

Hi
I am using JAVA -BOSDK to access reports from infoview. I have a problem when any universe level prompt is present in the report. I am able to retrieve it through java when i say documentInstance.getPrompts() and when i set values to this prompt by Prompt.enterValues(String[] parameters) and then either save the report or saveAs another report , my new values dont get applied to the prompt. Only previous values get applied to the prompt. I checked doing prompt.getPreviousValues and prompt.getCurrentValues but when i save the doc then new values are not set.
here is a part of code iam using: the filterlist contains the ConditionFilterDataItems objects which contain the operands,operator and queryObjectName .I have added multiple prompt.getPrevious and current values for debug purpose.
private static void applyValuesToUniversePrompt( final DocumentInstance doc, final List filterList )
        final DataProviders dps = doc.getDataProviders() ;
        final DataProvider dataProvider = dps.getItem( 0 ) ;
        final Query query = dataProvider.getQuery() ;
        Prompts newPrompts = doc.getPrompts();
        Prompt newprompt = newPrompts.getItem( 0 );
        newprompt.getPreviousValues();
        newprompt.getCurrentValues();
        final ConditionContainer conditioncont = (OMConditionContainer) query.getCondition() ;
        ConditionFilterDataItem conditionFilterDataItem = null ;
        final Map promptMap = generateInstanceMap( doc ) ;
        //Prompt [] promptArr ;
        for( int i = 0 ; i < filterList.size() ; i++ )
            conditionFilterDataItem = (ConditionFilterDataItem) filterList.get( i ) ;
            final String [] operands = conditionFilterDataItem.getFilterOperand() ;
            PromptsImpl univPrompts = (PromptsImpl)doc.getPrompts();
            Prompt [] promptArr = new Prompt[univPrompts.getCount()];
            for(int k= 0;k< univPrompts.getCount();k++)
                 promptArr[k] =(Prompt) univPrompts.getItem( k );
            if(univPrompts.getCount()==0)
                promptArr=null;
          if(promptArr!=null)
            for( int j = 0 ; j < promptArr.length ; j++ )
                final Prompt prompt = promptArr [j] ;
                final String promptName = prompt.getName() ;
                final Prompt currentPrompt = (Prompt) promptMap.get( promptName ) ;
                if( operands [j] != null )
                    currentPrompt.getPreviousValues();
                    currentPrompt.getCurrentValues();
                    currentPrompt.removeValues( currentPrompt.getPreviousValues() );
                    currentPrompt.enterValues( convertStringToArray( operands [j] ) ) ;
                    currentPrompt.getPreviousValues();
                    currentPrompt.getCurrentValues();
                    doc.setPrompts();
                    newPrompts = doc.getPrompts();
                    newprompt = newPrompts.getItem( 0 );
                    newprompt.getPreviousValues();
                    newprompt.getCurrentValues();
        //doc.setPrompts() ;
        doc.refresh();
        doc.save();
        newPrompts = doc.getPrompts();
        newprompt = newPrompts.getItem( 0 );
        newprompt.getPreviousValues();
        newprompt.getCurrentValues();
       // dataProvider.runQuery() ;
        doc.refresh();
        doc.saveAs( "universePrompt2",7148,null,null ) ;
         doc.closeDocument() ;
private static Map generateInstanceMap( final DocumentInstance document )
        final Map promptMap = new HashMap() ;
        final Prompts prompts = document.getPrompts() ;
        int count ;
        if( prompts != null )
            count = prompts.getCount() ;
            for( int i = 0 ; i < count ; i++ )
                final Prompt prompt = prompts.getItem( i ) ;
                promptMap.put( prompt.getName(), prompt ) ;
        return promptMap ;

Hi Shruti,
Can U kindly refer this [thread|BusinessObjects Enterprise Java Software Development Kit (SDK) ??; and reply back.
Would appreciate your efforts !!!

Similar Messages

  • How to pass values of the prompt through Action Link - URL in 11g

    Hi All,
    I am in OBIEE 11g v6.
    Let's say, I have two dashbaord pages P1 and P2.
    P1 page contains
    1. Prompt PR1 - containing a single column EmpName
    2. Report R1
    P2 page contains
    1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
    2. Report R2
    Requirement :
    Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
    Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
    Thanks,
    Ronny

    Hmm can you give a try one more time with
    Add EmpName name and hide it on report R1 on page P1
    and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
    Other option is read this doc once that helps you how to pass value thru url.
    http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
    You need to have a EmpName as Is Prompted on report R2 on page P2
    If helps pls mark

  • How to set value of application item using Java script.

    I have created a textbox on page 0, on chnage of textbox i want to set the value of application item.
    How to write the code to set & get value of application item.
    Thanks,
    -Amit

    Hello Amit
    This would be a great place to start...
    JavaScript
    Alternatively, APEX 4.0 will make this sort of task declarative.
    Kind regards
    Simon Gadd

  • How to set values to bpel variables from Java

    I have a java class to create files and populate some contents into it. On success it returnes "File Created"
    I used the following code to achieve it :-
    WriteFiles objWriteFiles=new WriteFiles();
    String para=((oracle.xml.parser.v2.XMLElement)getVariableData("inputVariable","payload","/client:FileTestProcessRequest/client:HO_ORG_ID")).getFirstChild().getNodeValue();
    String result=objWriteFiles.writeHeaderInfo(para);
    (writeHeaderInfo is a method in my java class)
    addAuditTrailEntry(result);
    I works fine..Now I want to assign this reult value to a bpel variable .. I tried doin it like below:-
    setVariableData("outputVariable","payload","/client:FileTestProcessResponse/client:result" , result)
    but its not working...I get a fault ...
    Can anyone help me out...
    Thanks,
    Githa.R.S

    In this example :
       <!-- Invoke the EmployeeStatus Java class instead of web service -->
       <bpelx:exec name="invokeJavaExec" language="java" version="1.4">
          <![CDATA[
             EmployeeStatus e = new EmployeeStatus();
                String firstName = ((Element)getVariableData(
                                 "EmployeeTravelStatusRequest", "employee",
                                 "/employee/FirstName")).getNodeValue();
                String lastName = ((Element)getVariableData(
                                   "EmployeeTravelStatusRequest", "employee",
                                   "/employee/LastName")).getNodeValue();
                String empStatus = e.getTravelStatus(firstName, lastName);
                addAuditTrailEntry("Employee status is: " + empStatus);
                setVariableData("EmployeeTravelStatusResponse", "travelClass",
                             "/travelClass", empStatus);
          ]]>
       </bpelx:exec>they dont use namespaces in the xpath-expression, can you try that ?

  • How to set the Date in excel through Java?

    now i am using
    cell.setCellValue(date);
    date is in format of "dd/MM/yyyy"
    But when it set on excel , it sets as number.
    I need the date as in same format as what i given.
    Assist me.

    Consult the docs of the API you're using. We can't say much about it because you didn't even mention the API used and it is also not recognizeable as part of any standard Sun Java API's. It might help to consult their own forum/mailinglist -if any- as well.

  • How to set value in combox by code

    how to set value in combox by code

    Dear
    You can use the following code to set the values in combobox by a query
       strQuery = "select ItemCode,ItemName  from OITM"
            oRecSet = Me.SBO_Company.GetBusinessObject(BoObjectTypes.BoRecordset)
            oRecSet.DoQuery(strQuery)
                 oCombo = Me.oForm.Items.Item(encontrolName.colEmpType).Specific
            If oRecset.Fields.Count > 0 Then
                While oRecset.EoF = False
                    oCombo.ValidValues.Add(oRecset.Fields.Item(0).Value, oRecset.Fields.Item(1).Value)
                    oRecset.MoveNext()
                End While
            End If
    Regards
    Rupinder

  • How to set value in selectOnemenu using binding

    hi all.
    i have bind htmlSelectOneMenu. it contains some value. I want to set or display a value after a process.
    How to change value
    i have tried using setValue method of both binding property and value property of htmlSelectOneMenu.
    Same issue is with InputTextArea. how to set value in it via code(RowSelectionListener of icefaces)

    Balaji wrote:
    hi all.
    i have bind htmlSelectOneMenu. it contains some value. I want to set or display a value after a process.
    How to change value
    i have tried using setValue method of both binding property and value property of htmlSelectOneMenu.
    Same issue is with InputTextArea. how to set value in it via code(RowSelectionListener of icefaces)The html SelectOneMenu is bound to a value of a backing bean. You have to change the value of that backing bean, not the JSF component directly. JSF takes care of updating the model, you shouldn't be touching it unless you know what you are doing.

  • How to set value of a column in report region

    Hi,
    I have a report region based on a query.In this my first column is selectlist "select row" having to values "yes" & "No".
    I have two buttons on top of the region "Check all" and "uncheck all".
    My requirement is when I click check all button all rows corresponding to "select row" column gets selected to Yes and when I click No all rows gets selected to "No".
    Thanks
    Vikram

    Actully I want to set the value of a column in report region.
    There are replies in the forum but in those the item is in form but not in the report region.
    I am generating report region by using htmldb_item.selectlist and i dont know how to set value in these type of items.

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • How to set value for trim and bleed using jsx script?

    I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
    Following is the code I am trying with:
    var _saveName = new File ( root_path +_strFileName+".pdf");
        var _saveOpts = new PDFSaveOptions();
        _saveOpts.printerResolution = 300; 
        var bleedarray = new Array();
         bleedarray[0] =9.00;
         bleedarray[1]=9.00;
         bleedarray[2]=9.00;
         bleedarray[3]=9.00;    
        _saveOpts.bleedOffsetRect = bleedarray;

    I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
    var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
    Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds.

  • Help on how to set value on LinkButton type column

    Hello,
    Can I programmatically set a value on Item No. in matrix on Sales Quotation which is of type SAPbouiCOM.LinkedButton?
    This code helped me set values to an edittext type column
    Dim et As SAPbouiCOM.EditText = oMatrix.Columns.Item(matrixColumnID).Cells.Item(rowNumber).Specific
    et.Value = value
    Dim et As SAPbouiCOM.LinkedButton = oMatrix.Columns.Item(matrixColumnID).Cells.Item(rowNumber).Specific
    How can set value for the Item No.?
    Thanks and Regards,
    Sheetal

    Just treat the Item No. column as an EditText for purposes of setting its value.
        Dim sboEdit As SAPbouiCOM.EditText
        Set sboEdit = sboMatrix.Columns("1").Cells(lngRow).Specific
        sboEdit.Value = "XXXXXX"
    John.

  • How to set value to dimension1,2,3 column in AP Invoice?

    Dear All,
    I have a problem when creating AP Invoice using SAP B1 2005 B DI/API. The problem is when i can not find dimension1, dimension2, and dimension3 properties in oDraft.Lines. (oDraft is my variable for object  oPurchaseInvoices).
    How to set value to dimension1,2,3 column in AP Invoice using DI/API ?
    Regards,
    Herfin J.

    Hi! Yatsea,
    I am working with 2007B, In the order reference of B1WS, I found only CostingCode and COGSCostingCode provided:
    OrdersService.DocumentDocumentLine.CostingCode() As String
    OrdersService.DocumentDocumentLine.COGSCostingCode() As String
    Where are the rest 4 dimensions for both of them?
    Plus, I also got the XML from DI server, with only one CostingCode exposed.
    Thanks
    Constantine

  • How to set value for radio button in sap crm survey suite

    Hi ,
    I created a survey in CRM Service, in which I added a question with answer as '10 Selection Button Group ('radio button'). And answer has 11 answer options (which means 11 radio buttions). Now when we test the survey, the value for the radio buttons is appearing like 'id_0050569b03091ee480a29d8ee61e953c'. But i want to set a specific value for each radion button (from 1 to 11). So, how to set value for radio button in sap crm survey suite???.
    Thanks & Regards,
    Seshu

    Hi,
    I found solution myself. Click on Goto -> Editing Mode -> Expert Mode. Now you can set value for radio button.
    Regards,
    Seshu

  • How to set value for selectOneChoice

    Hello,
    How to set value for selectOneChoice defined as:
    <af:selectOneChoice label="Label" id="soc1" binding="#{DepositorMergingBean.socSurnameComponent}">
    <f:selectItems id="si1" value="#{DepositorMergingBean.socSurnames}"/>
    </af:selectOneChoice>
    where socSurnames is List<SelectItem> - manually filled list of SelectItem(SomeObject, (String)text_description), so - SOC is filled manually (no binded iterators, etc..)
    Neither socSurnameComponent.setValue( new Integer(0) ) nor socSurnameComponent.setValue( socSurnames.get(0) ) do not help.
    Thanks in advance.

    this.selectOneChoice.setValue(selectItems.get(2).getValue());Try as per the following sample:
    SelectOneChoiceTest.JSPX:
    <af:form id="f1">
    <af:selectOneChoice label="Select One Choice" id="soc1"
    binding="#{SelectOneChoiceTestBean.selectOneChoice}">
    <f:selectItems value="#{SelectOneChoiceTestBean.selectItems}"
    id="si1"/>
    </af:selectOneChoice>
    <af:commandButton text="Set Selected Value" id="cb1"
    actionListener="#{SelectOneChoiceTestBean.onClick}"/>
    </af:form>
    SelectOneChoiceTestBean.java:
    import java.util.ArrayList;
    import java.util.List;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.view.rich.component.rich.input.RichSelectOneChoice;
    public class SelectOneChoiceTestBean {
    private RichSelectOneChoice selectOneChoice;
    public SelectOneChoiceTestBean() {
    super();
    private List<SelectItem> selectItems;
    public void setSelectItems(List<SelectItem> selectItems) {
    this.selectItems = selectItems;
    public List<SelectItem> getSelectItems() {
    selectItems = new ArrayList<SelectItem>();
    selectItems.add(new SelectItem("One", "One"));
    selectItems.add(new SelectItem("Two", "Two"));
    selectItems.add(new SelectItem("Three", "Three"));
    return selectItems;
    public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
    this.selectOneChoice = selectOneChoice;
    public RichSelectOneChoice getSelectOneChoice() {
    return selectOneChoice;
    public void onClick(ActionEvent actionEvent) {
    this.selectOneChoice.setValue(selectItems.get(2).getValue());
    Thanks,
    Navaneeth

  • How to set value on MRU insert Tabular Form

    This post refers to the forum article found How to set value on MRU insert Tabular Form
    I have included the problem and proposed solution below. My problem follows
    Problem
    Hi,
    I am using a Tabular Form. I used the wizard and it created all of the items (Cancel, Submit, Add, Multidelete buttons, etc.). I have a table that is like an FK table. For instance, we could have a customer table, and then a customer address table. Each customer could have multiple addresses. In the address table, the first ID column is the customer ID. So in using the tabular form for the addresses, I need to make the first column the same when I insert. But when I choose add row, everything works fine except it tries to insert a null into customer id. The uniqueness of the row is determined by customer ID and address string.
    Any time I make it to this screen, all new rows will have the same ID with I have in a variable that I can reference from the page called :P0_ITM_CUST_ID.
    How do I set the first value for all inserts? My guess is I need to do this in Computations. I'm also guessing I need to do this with a replace statement. I'm just not sure how to reference the first column of the new row.
    Thanks!
    Tim
    Solution
    The way to do this is by using the "Default" value for that Column. Go to
    Home>Application Builder>Application xxx>Page yyy>Report Attributes>Column Attributes
    Set the default value for newly added rows as in
    http://img237.imageshack.us/img237/5758/screenshot012di2.jpg
    Hope this helps.
    Un-resolved problem
    have also tried to do this but the fields I see are not the same.
    Please see screenshot=http://krisjones.freewebspace.com/apex.JPG
    I am using the Oracle hosted environment, so 2.2.1.
    To my knowledge I have done the same as the user in the first post. Am I doing something incorrectly or should I have created the tabular form differently?
    Many thanks. Kris

    Kristian - You see a different version of the form depending on whether the selected column is the primary key column or not.
    Scott

Maybe you are looking for

  • Can I use a SD Card rather than a USB stick when using Lion Recovery Disk Assistant

    I'm using a MB Pro 2010, can I use a SD Card in the SD Card slot rather than a USB stick when using Lion Recovery Disk Assistant.  I would like to use the 16GB chip with a single 1GB partition so I can dump a bunch of other backup stuff into the same

  • Having problems restoring a first-gen iPod

    First time posting but I am out of ideas and even Google has limits so I'm giving this board a try. I have a first-gen iPod. I purchased it in October 2001 and it's in great physical condition. Only problem was that the battery would no longer hold a

  • Mac Mini and MBP Memory Compatible?

    Hello Everyone! I have a Mac Mini it is a 2009 (Metal Surrounding with Acryllic top), and I have a 2010 MacBook Pro. MacMini Specs are as Follow - 2.0 GHz Intel Core 2 Duo - 8 GB Ram 1333MHz DDR3-SODIMM (2x4GB DDR3 SODIM,H) - 120 GB 5400 RPM HDD MacB

  • Loaded Infoobject Text  and it returned all "#"

    Hi BW guys, I encountered a strange text issue. In BW QA envoriment all the Text Datasources without a language key  loaded all text as "#" in PSA. Meanwhile, the datasource with language key works well. In ECC QA side I could extract correct text wi

  • Premiere Pro CS5 crashes while editing 4.5K-RED-Material

    Hi there, I'm editing 4.5K-material with Premiere Pro CS5. After a couple of minutes (mostly after watching sequences longer then 10 seconds) the program crashes. Windows 7 tells me that "ImporterREDServer.exe" doesn't work anymore and then Premiere