Condition (expression) builder

Hi all,
Does anyone have a clue where I can find a java Swing control that will enable the construction of something similar to a java condition with a grafical user interface?
I want to build a designer that will enable the user to generate a conidition/expression using a convinient user interface.

You cannot use If statements on expressions. You can convert it to a "case":
CASE
WHEN INGRP1.TOTAL_ORDERS THEN 0
ELSE (INGRP1.EST_SUBSCRIPITION / INGRP1.TOTAL_ORDERS ) * 100
END
Regards,
Bruno

Similar Messages

  • 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'};"/>

  • 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

  • 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

  • Expression Builder: convert string to number

    Hi all,
    I'm having trouble building a field validation rule for bank account numbers.
    The numbers have 12 positions, so I cannot use a string or text number.
    The validation rule to be implemented is that the last two digits are calculated based on the first 10 (modulo 97).
    However, when I use the Mid function to pick the first characters, I am unable to do any calculations on it. Apparently, the string to number conversion doesn't work (it should work when I read the manual, as it says that when using an operator between two data types, the second type is converted to the first (cf. example of 1234+abcd (should result in 1234 as to the manual))). So I tried '1*Mid(...)' or '0+Mid(...)'. Syntactically the expression builder accepts it and I can save it. BUT when I change the particular value on the screen, it gives me an SSO error (not the Field Validation error message I entered).
    Why isn't there simply a function ToNumber (like ToChar)????? How could I workaround this?
    Any input very welcome!
    Frederik

    Apparently, I was a bit confused when typing the first sentence, it should be:
    The numbers have 12 positions, so I cannot use an integer or number data type, but have to use String.

  • Logical SQL about Expression Builder

    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
         Concat
    Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 4 for 8
         '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
         Cast
         Concat
              Substring(
                   Cast(
                       "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
                   FROM 4 for 8
              '04-01'
    AS DATE
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
         Concat(
              Substring(
                   Cast(
                        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
              FROM 0 for 5
         '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

    Dear Fame and all
    Hello.Thanks you for reply.
    Hi,
    You Missed END key word in the statement.Sorry,I mistake copy & paste only.
    So,The problem is still not resolved.
    The following shows, that the error has been corrected in the first message.
    Dear all
    I am Michel.
    When I was always trouble,
    everyone will go to support this Forum, I am glad.
    I want to fix Logical SQL about Expression Builder of Oracle BI 11.1.1.3.
    In detail, Business each year, fiscal year you want to make is to display
    the beginning of the fiscal year of April 1, always, the data,
    "OUTPUT_DATE" from April until March the following year.
    Currently being output error is as follows.
    :[nQSError: 22020] Function Subtring ( argument 1) does not support non-text types. (HY000)
    I want to fix logical SQL is as follows.
    case when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('04','05','06','07','08','09','10','11','12')
    then Cast
    Concat
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    when substring("app_support"."TABLE_NAME"."OUTPUT_DATE" from 4 for 5)
    in ('01','02','03')
    then timestampadd(SQL_TSI_YEAR,-1,
    Cast
    Concat
    Substring(
    Cast(
        "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 4 for 8
    '04-01'
    AS DATE
    end
    For reference, logical SQL follows,
    there is no error, and it is operating normally.
    Cast
    Concat(
    Substring(
    Cast(
    "app_support"."TABLE_NAME"."OUTPUT_DATE" AS char
    FROM 0 for 5
    '-01')
    AS DATE
    I will grad to reply message.
    Thanks and regards.

  • 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)

  • How to use SQL OVER and PARTITION BY in OBIEE Expression Builder??

    Hi there,
    I want to create a new logical coulmn with the following SQL query.
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )
    How to use the OVER and PARTITION BY in OBIEE Expression Builder??
    Thanks in Advance

    hi bipin,
    We cant use by in Expression builder(rpd) .But use the same formula like this in Fx of answers
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) >OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )SUM(Inventory Detail.Qty by Detail,ITEM,Mydate)/SUM(qty by detail,item)
    First check the numerator whether it was giving correct results or not then go with denominator
    compare the results with sql that u have
    Let me know if that does work
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 27, 2010 9:27 PM
    Edited by: Saichand Varanasi on Jul 27, 2010 9:28 PM

  • Why does my conditional expression not work?

    I want to increment a global keeping track of how many critcal tests have been run. Usually I just increment it in the post expression of the test. However, if I have a test that loops it would increment on every loop, so I put a conditional expression in the post expression so it only counts once the loop is done:
    RunState.LoopIndex < 10 && RunState.LoopNumPassed < 3 ? FileGlobals.Critical_Test_Count : FileGlobals.Critical_Test_Count++
    However, the false condition in the expression never gets evaluated. I've put watches in to make sure the condition goes false after the last interation of the test and it does. But my global never increments. The true condition is not supposed to modify the variable.
    What am I miss
    ing?

    The reason for this is that the post expression is evaluated before the loop increment expression, so on your last loop the post expression is evaluated (loop count = 9) then the loop increment is evaluated and the loop is terminated. See page 6-26 of the Teststand user manual.
    Hope this helps,
    Nick

  • How to populate an EO Transient variable used in Conditional expression.

    Hi All
    I have a Unique Key Validator which has Conditional Execution in which I am checking for the value of transient variable and based on that value this validator is invoked.
    Problem is :- When this Conditional expression is processed, transient variable is not populated (code to populate it is written in getter method). As a result of which, I am not getting expected results.
    This is my conditional expression :- source.<Transient_variable> = <some value>
    I tried by replacing this expression as :- adf.object.getterMethod = <some value> , but that gave me the prototype not found error (method is present in EOImpl.java).
    How can I populate this transient variable before it is evaluated in conditional expression???
    Suggestions are welcomed!!!
    Thanks
    Nitin

    Just to explain
    Both adf.object.methodName and source.methodName are used to access EntityImpl methods. Difference is
    adf.object.methodName - used while defaulting the values of attributes
    source.methodName - used in validation expression and raising error messages/warning.
    Thanks
    Nitin

  • Checking for empty tags using expression builder for XPATH

    I am creating several filters in a mediator for several parallel paths. I am trying to route the mediator to the correct DB adapter based on what tags are empty in the incoming XML. The XML has 1 required tag and 3 optional. So for the expression, I am using the expression builder to load the tag name then putting either [text()] or [not(text())] immediately after each tag with an "and" in between for the 3 optional elements. The problem I am having is they always return false. For example, if I enter a value for an optional tag and put [text()] after it, it evaluates to false. What is the correct way to check if an element has text or not?
    Thanks in advance!

    Hi,
    Its not recognizing the getVariableData func... instead try this:
    string-length(xpath)>0
    ex: string-length($in.body/imp1:manoj/imp1:C1)>0
    It works... Happy deploying ... :)

  • [svn:fx-trunk] 11530: Fix ASC-3790 ( conditional expression in for loop causes verifier error) r=jodyer

    Revision: 11530
    Author:   [email protected]
    Date:     2009-11-06 13:23:05 -0800 (Fri, 06 Nov 2009)
    Log Message:
    Fix ASC-3790 (conditional expression in for loop causes verifier error) r=jodyer
    Ticket Links:
        http://bugs.adobe.com/jira/browse/ASC-3790
    Modified Paths:
        flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/ConditionalExpressionNode.java

  • How to use TRUNC function with dates in Expression Builder in OBIEE.

    Hi There,
    How to use TRUNC function with dates in Expression Builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns '07/01/2010' where sysdate is '07/15/2010' in SQL. I need to use the same thing in expression builder in BMM layer logical column.
    Thanks in advance

    use this instead:
    TIMESTAMPADD(SQL_TSI_DAY, ( DAYOFMONTH(CURRENT_DATE) * -1) + 1, CURRENT_DATE)

  • 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

Maybe you are looking for

  • Need quantitative as well as amount data for an account member

    Requirement of the report is that for an account dimension member, there needs to be quatity, amount as well as a ratio in a single line along with the unit for the quantity (which i will keep in the custom dim). Is this possible.. what are the ways

  • How to reduce noise when there's only black and white?

    Hi all, Total noob here, I've searched all over the place to no avail (or I just didn't know the correct term), but how do you do that? Basically I'm trying to just extract lines and texts out of it, and filtering and exposure did nothing for me. As

  • SAP Downtime through SAP

    Is there is any way to check the SAP downtime through SAP itself. Regard Vishnu

  • Call proxy service from other proxy service with attachment

    Hi! I have got an email sending proxy service I would like to call this from an other proxy service and I want to send attachment in email. I can send email with attachment if i call this proxy as a webservice (e.g. from soapUI) But if i want to call

  • PKGBUILD - PixelLight

    I was interested in trying out the PixelLight 3D engine, but found that it was not available in the repos or AUR, so I decided to try and create a PKGBUILD for it. As this is my first PKGBUILD, It's not exactly ready for prime time. There are issues