Expression Builder Help

Hi ,
I am new to obiee and this might be a little silly.
I have some logical columns
1. Order IMC number
2. Order IMC type code
3. Order IMC indicator
I am trying to create a metric -> count of (Order IMC number) where (Order IMC type code = customer or commerical customer) and (order IMC indicator= N)
I think i am putting in the right expression but its throwing me syntax error. Any help would be appreciated.
Edited by: user9120695 on Oct 20, 2010 8:43 PM

didn't mention what is the code you written there.
try this:
case when (Order IMC type code in ('customer','commerical customer') and order IMC indicator= N) then Order IMC number end
create this column with physical mapping if all other columns are coming from same table..
Now, on top of this column, apply aggregation rule to count and check
One more thing: as you are new to forums.. i want you to go through this link ..
http://forums.oracle.com/forums/ann.jspa?annID=939

Similar Messages

  • Using Decode in Expression Builder...

    Hi everybody,
    I want to use the DECODE function of SQL in an Expression Builder....
    Of course this function does not exist in any of the transformation categories(arithmetic,character,e.t.c.) in the expression builder.
    I have read in the OWB on-line help that in the Expression Builder there should be an 'Others' drop - down list in order to select any of the available SQL clauses - one of them is 'decode'...
    The problem is that this drop - down list in the Expression Builder is disabled.....
    How can I use this function anyway..????
    Instead of using ... in the Expression Builder...
    decode(<column_name>,'1','val_one','2','val_two') what can I use to do the same....???
    As regards the problem that the drop-down list is disabled , what may be the cause..???
    I use Microsoft XP machine , Oracle 10g (v.10.2) and OWB v.10.1.0.4
    The documentation says....
    "This allows you to deploy the DECODE functionality in all operating modes (setbased, rowbased, etc.) and transparently across Oracle database releases (8.1, 9.0 and 9.2)."
    The above means that the cause is the incompatibility..????
    Thanks , a lot
    Simon

    I am using OWB 9.2.0.8 and I can't reproduce the problem you are having with 10.1, but did you try just typing it into the expression?
    Or, better yet, use CASE. The syntax is easier to read. I think OWB translates DECODEs to CASE when the SQL is generated.
    (Case <column_name>
       When '1' Then 'val_one'
       When '2' Then 'val_two'
    End)

  • Using case statement in OWB expression builder

    Hi All,
    We are using OWB version 10.2.0.1.0. While using the below case statement We are getting the validation message as 'The expression is not properly formed'.
    Case statement used in expression builder:
    case when (INGRP1.CHARGETYPE in ('O','F') or INGRP1.TARIFF_GROUP in ('SMSINT','MMSINT')or ( INGRP1.CALL_TYPE = '002' and INGRP1.TARIFF_GROUP = 'MTV'))
    then
    (select call_zone_reltn_key from call_zone_reltn where
    call_zone_cd=substr(case
                   when substr( INGRP1.B_SUBNO,1,2)='00'
                   then
                   substr( INGRP1.B_SUBNO,3)
                   else substr( INGRP1.B_SUBNO,1)
                   end,1,length(call_zone_cd))and rownum=1)
    else -1
    end
    Kindly help me out in fixing this error or suggest any alternate way to use the above query in OWB expression builder.
    Thanks,
    Kabilan

    946887 wrote:
    Hi All,
    We are using OWB version 10.2.0.1.0. While using the below case statement We are getting the validation message as 'The expression is not properly formed'.
    Did you try to deploy the mapping ? Some time the expression validator gives wrong error messege.
    Try to deploy the mapping and see if you are still getting this issue
    Case statement used in expression builder:
    case when (INGRP1.CHARGETYPE in ('O','F') or INGRP1.TARIFF_GROUP in ('SMSINT','MMSINT')or ( INGRP1.CALL_TYPE = '002' and INGRP1.TARIFF_GROUP = 'MTV'))
    then
    (select call_zone_reltn_key from call_zone_reltn where
    call_zone_cd=substr(case
                   when substr( INGRP1.B_SUBNO,1,2)='00'
                   then
                   substr( INGRP1.B_SUBNO,3)
                   else substr( INGRP1.B_SUBNO,1)
                   end,1,length(call_zone_cd))and rownum=1)
    else -1
    end
    Kindly help me out in fixing this error or suggest any alternate way to use the above query in OWB expression builder.
    Thanks,
    Kabilan

  • Compare only DATE portion of a datetime field in Expression builder

    Hi! All,
    This may be a simple question, but I couldn't find the answer. I have a query where I want to say :
    Expression exp = exp1.get("startDateTime").equal(pDate);
    here pDate is a java.util.Date class with a time stamp.
    I wish to basically compare just the DATE portion of the value stored in the data base with only the DATE portion of "pDate" and ignore the time component.
    How do I do this in expression builder?
    By the way we are on Toplink 9.0.4.5
    Thanks

    There are a couple of ways to accomplish this. You could use between(beginningOfDay,endOfDay) where beginning of day is 12:00:00am on the date specified in pDate and end of day is 11:59:59pm on pDate. Or you could consider using a combination of dateName(), datePart(), and/or truncateDate() expressions to compare at the day, month, year level. I am not sure which would give you better performance, so you might need to do some testing to verify.
    In the first case, create beginningOfDay and endOfDay based upon the date housed in pDate. Then:
    Expression selectionCriteria = exp1.get("startDateTime").between(beginningOfDay,endOfDay);
    In the second case, there would be a little more code to write:
    Expression startDateTimeExp = exp1.get("startDateTime");
    Expression dayExp = startDateTimeExp.datePart("day");
    Expression monthExp = startDateTimeExp.datePart("month");
    Expression yearExp = startDateTimeExp.datePart("year");
    int desiredDay = get day of month from pDate;
    int desiredMonth = get month of year from pDate;
    int desiredYear = get year from pDate;
    Expression selectionCriteria = dayExp.equal(desiredDay).and(monthExp.equal(desiredMonth)).and(yearExp.equal(desiredYear));
    Check out the TopLink API docs on the Expression class for more details on what these Expression building methods do : http://download-west.oracle.com/docs/cd/B10464_05/web.904/b10491/index.html
    Hope that helps,
    Doug

  • Why is ADF Bindings node not displayed in Expression Builder window?

    Hello,
    I'm using Oracle JDeveloper Studio Edition Version 11.1.1.1.0, and I've created a Fusion Web Application and I've configured ADF Authentication and Security for my web project, using the provided wizard.
    On a certain page, I've placed a Go Link component, and I'm trying to edit the Text and Destination Property using EL Expressions. When I open the Expression Builder window all I can see are the following nodes: ADF Controller Objects, ADF Managed Beans, JSF Managed Beans and JSP Objects, but no ADF Bindings. I need to access the securityContext properties, and from what I've read in B31974-03, I need ADF Bindings.
    Also, I've tryied using the search field from the Expression Builder windows, without any luck.
    This is probably a newbie problem, but I really can't figure it out. Please help.
    Bogdan.

    Hi,
    maybe your problem is that you don't have created pageDef related with your page. Try right click on your page and Go To Page Definition. It will create the related pageDef if it does not exist.
    Hope this helps
    Joseba

  • "Others Tab" disabled in Expression Builder

    I am tryng to create a very simple mapping with one source (Table) an Expresion Operator and a Target table. The problem I am facing is that the "Others Tab (Dropdown)" is coming as disabled in the Expression Builder. If any one can help me on this that will be really helpful for me !~
    Thanks
    Anish

    As well as using the transformation route it is possible to just type whatever you want here (within the context of the expression operator and the mode in which it will be executed). If you want to refer to attributes of the operate use the Inputs tab.
    It looks to be disabled in the expression operator but not in other operators such as filter, aggregator
    Cheers
    David

  • Ceiling Function in Expression Builder in an Update Field Value Workflow

    I'm trying to use the "ceiling" function in an update value workflow. I want to multiple the number value in field A by the currency value in field B and have that new value display in field C. But I also want to round up or ceiling the resulting value to the nearest $0.10. Here is what I want to do, but this is not working. PLEASE HELP.
    EXPRESSION BUILDER FUNCTION
    FIELD C = CEILING((FIELDA*FIELDB)+FIELDB,0.1)
    Edited by: gprobertson on Feb 15, 2010 10:20 AM

    Hi, I dont think this function is supported in workflow expressions. It is only available in reporting / analytics. Even there it only Rounds a noninteger numerical expression to the next highest integer. Even the function round doesnt seem to be available in workflow functions list
    -- Venky CRMIT

  • Using managed bean method in expression builder

    Hello,
    I'm new to adf and I have the following problem.
    I have a managed bean in session scope that has the following method:
    public boolean alertMessages() throws NamingException,
    SQLException {
    if (condition)
    {  return true;}
    else
    {return false;}
    I have a page that has a link. Using the expression builder and according the function result I want to make the link bold or not.
    I use the expression #{sessionScope.backing_pages_index.alertMessages ?'bold':'normal'} but it does'n work.
    Could anybody help me.
    Thank you,

    Hi..
    If you add your bean as sessionScope No need to add sessionScope to EL front,and should setter and getter for alertMessages
    use *font-weight:#{backing_pages_index.alertMessages ? 'bold':'normal'}*
    try as follows it is working for me
    > private boolean alertMessages;
    > public void setAlertMessages(boolean alertMessages) {
    > this.alertMessages = alertMessages;
    > }
    > public boolean isAlertMessages() {
    > if (true) {
    > return true;
    > } else {
    > return false;
    > }
    > }
         <af:commandLink text="commandLink 1" id="cl1" action="CustomPage"> inlineStyle="font-weight:#{backing_pages_index.alertMessages ? 'bold':'normal'};"/>

  • JDeveloper BPEL Expression Builder : getFaultAsString()  not found

    Problem:
    In the JDeveloper BPEL Expression Builder Dialog (Assign activity) I see only 4 functions under " Advanced Functions" menu.
    1. created-nodeset-xxxx
    2. generate-guid
    3. lookup-xml
    4. parseXML.
    I expect functions like getFaultAsString() to be there. Without i I can not get the fault string. Can you please help ?
    Version Information:
    Oracle J Developer : Studio Edition Version 11.1.1.3.0
    Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660
    ADF Business Components     11.1.1.56.60
    BPMN Editor     11.1.1.3.0.6.84
    Java(TM) Platform     1.6.0_18
    Oracle IDE     11.1.1.3.37.56.60
    SOA Composite Editor     11.1.1.3.0.25.57
    Versioning Support     11.1.1.3.37.56.60
    Thanks in advance!

    Hi,
    You can put directly the function: ora:getFaultAsString()
    Type ora:get and press Ctrl-Space - this will open all the possible available functions.
    Arik

  • Expression Builder In Oracle Rule Authoe

    Hi,
    I am using expression builder for making this kind of expression:
    x = y* (new Double(.02))
    where x and y are Double.
    after inserting the variables and operator, validation always fails showing the following message:
    Cannot perform operation. 'RUL-01726: Data type operator for *, at position 10: java.lang.Double * java.lang.Double '
    Please tell me where i am going wrong. It's very urgent.

    Thanks for the reply Phil.
    I think that when I am updating datamodel, it is updating every thing in data model i.e. variables, constraints, functions, facts everything.
    Do you have knowledge of any method in the API which updates only variables??
    Also, i followed a different methodolgy be using RuleSession. have a look at code snippet:
    String rsrl ;
    * Double testValue = 6000.0;*
    * Double discount = new Double(0);*
    * try {*
    * rsrl = dict.ruleSetRL( ruleSetName );*
    * String dmrl = dict.dataModelRL();*
    * RuleSession session = new RuleSession();*
    * session.executeRuleset( dmrl );*
    * session.executeRuleset( rsrl );*
    * discount = (Double)session.callFunctionWithArgument("DM.calculateDiscount",testValue);*
    * System.out.println(" Discount "+discount);*
    * } catch (Exception e) {*
    * e.printStackTrace();*
    Here instead of updating dataModel i am executing ruleSet using session and callingFunction to calculate discount.
    Now if disocunt is populated independent of any other vairable (e.g. discount = 10.0d instead of discount = 10.0*salesValue)
    then it should work. But if discount is dependent on some variable (which has to be global Variable) then it would not populate it.
    This is what i have thought.
    But the above code snippets always give following exception :
    oracle.rules.rl.exceptions.InvocationException: wrong argument type in function or method invocation
    even when function takes arguments in my dictionary.
    Your help is much awaited!! Thanks in advance.

  • Using expression builder

    hi,
    how can i use where condition at expression builder at admin tool, can you share sytax please?

    Hi,
    Whenever you click on the expression builder the syntax will be shown to you as soon as you click on the functions or any object you select.
    In the logical table source, content tab, where clause, whatever condition you specify it gets reflected in the query when ever you pull the columns from the table.
    For example-
    If you are specifing the condition as
    Region_name='Asia'
    Then when ever you pull the columns from the table then the data will get restricted with 'Asia' data only.
    You can als call functions, session variables.
    Hope this helped/ answered.
    Regards
    MuRam

  • Expression builder in BPEL

    Im trying to manipulate a file name at runtime. Right now I have the inbound header mapped to the outbound header so that the file gets to its destination with a dynamic filename. We are picking up multiple files Ex. KL* and the customer wants the same file name as was picked up. So anyway now they want it picked up as a .dat file and dropped off as .txt
    I am lokoing through the expression builder via jdeveloper and see there are many funtions. From the looks of it there is something to modify this extension i want to change but im having a hard time finding one or documentation explaining what each of these functions do
    any help please

    Well assuming the below would be my Xpath statement because there is no statement in here that says read a specific file.txt it is read in in dynamic what i mean is we say pick up DEF*.dat so we want any DEF.dat to get read in but at the same time we want the original name stay on the file as it gets processed. So we may have DEF123, DEF456, DEF789 get read in but they will keep their file names as going through
    <variable name="Inbound_Head" messageType="ns3:InboundHeader_msg"/>
    So first off when creating variables i never knew there was a way to make a "temp variable" so if I could create a "temp" one then
    concat(substring(bpws:getVariableData('gdotltest.dat')), 1, string-length(ns3:InboundHeader_msg('gdotl.dat')) -3 '.dat')
    ok and then when you are saying
    "First save your fileName " Are you saying the name as the file name i want as in right now it is gdotltest.dat
    are you saying assign the variable for ns3:InboundHeader_msg as 'gdotltest.dat
    I am sort of seeing where you want to to go with this just help me out a little more if you could
    So i got this variable that is associated with DEF*.dat filename right
    Ex. ns3:InboundHeader_msg = DEF*.dat
    So then i want to create a temp variable name something like ns7:InboundHeader_msg_TempVar <--------- just saying for example correct me on any syntax error and im going to want to associate this variable i made up with DEF*.txt so that when my bpel interacts with this hmmmmmmm thinking about this now how will this keep the dynamic file naming convention still going if now im associating a new variable with a file coming throguht that is suppose to keeps it s name ? Sorry to sound confusing but explain one last time how we are keep the first half of the file name dynamic and making the .dat or .txt or .doc unique to just output as .dat ?

  • Failed to initialize the XPath Expression Builder

    Any idea what causes this and/or how to fix it?
    When I am in the XPath Expression Builder, I pick "Conversion Functions" and start with "string". Inside the "string()" parentheses, I do "bpws:getVariableData()", and select my output variable from an invoke.
    Then it SHOULD allow me to continue picking parts of that variable, down to the node I want, but instead I see in my JDeveloper log that a "Failed to initialize the XPath Expression Builder" error has been thrown.
    Thoughts appreciated...
    Smalls

    Can any of you Oracle guys help with this today?

  • EJB missing expression builder

    I'm getting an exception:
    Exception Description: The query has not been defined correctly, the expression builder is missing. For sub and parallel queries ensure the queries builder is always on the left.
    Query: ReportQuery(profil.Person)
    this is my query in profil.Person:
    @NamedQuery(name ="Person.findByProfilalder", query ="select o from Person o where o.foedselsdag =:foedselsdag and o.personid not in (select c.personid from Testperson c)")
    where should I look for an error ? what is the problem ? what is the builder ?
    The query did work until I made other queries.
    I have a method in a sessionBean that must choose between the many queries
    if(somthing)
    then query one
    else query two
    Hope this is enough to help me
    thanks

    I have found out that the sub query: not in (select c.personid from Testperson c) is the problem....
    Will putting the query in my ORM.XML change any thing ?

  • Issue with Expression Builder Popup on UI

    In one of our UI's we have column which has an expression and an image as the value.One clicking the image an expression builder popup opens,where we can change the expression value(which will later gets updated in the column).This is how the column looks:
    <af:column sortProperty="Condition" filterable="true" sortable="true" filterFeatures="caseInsensitive"
    headerText="#{bindings.OrchestrationProcessStatusLogic1.hints.ConditionDisplay.label}"
    width="400" id="column3" showRequired="true">
    <af:panelGroupLayout id="pgl1" layout="horizontal">
    <af:outputText value="#{row.bindings.ConditionDisplay.inputValue}"
    id="outputText5" partialTriggers="eb1"/>
    <af:spacer width="10" height="10" id="s1"/>
    <eb:expBuilder expBuilderBean="#{dooStatusExpBuilderBean.expBuilderBean}"
    tabModels="#{dooStatusExpBuilderBean.tabModels}"
    id="eb1"
    expBuilderListener="#{dooStatusExpBuilderBean}"
    expValue="#{row.bindings.ConditionDisplay.inputValue}"
    rendered="#{!pageFlowScope.releasedProcess}"/>
    </af:panelGroupLayout>
    </af:column>
    When we enter an expression in the popup and click OK,we are implementing a certain method(processValueChange(ExpBuilderEvent evt) from oracle.bpel.expbuilderdc.model.ExpBuilderListener) in dooStatusExpBuilderBean to check the correctness of the expression.
    When we enter an incorrect value in the Expression builder pop up and click 'OK',An error message is displayed and Expression Builder popup closes and the old value of expression is retained in the column.Is this the default behaviour? Wouldn't it be more practical if the expression builder popup remains open in case we enter incorrect expression and click OK.
    We don't have the handle over expression builder pop up ,Is there a way we can override the default behavior and keep the pop up in case of an invalid expression and errors?
    Any inputs on this would be really helpful.
    Thanks,
    Sowjanya.
    Edited by: 905801 on Jan 9, 2013 9:08 AM

    You should all this the supplier of the component.
    We don't now about the component.
    Timo

Maybe you are looking for