Conditional logic execution

Hi folks,
I'm pretty sure that, strictly speaking, this isn't possible, but I'm hoping someone has found a workaround.
I want to run logic on a set of data ONLY if the dimension members used contain certain flags (for example, only run logic when the CATEGORY.ID property is "PLAN2").
Sounds easy enough, but when the *WHEN / *IS statement hits a value that is TRUE, I want to trigger another script, rather than a simple *REC statement.
Does anyone know a way to do this? We are using BPC MS version 7 sp7.
Thanks,
Jason

You can try using the *TEST_WHEN command and also some *INCLUDE command for what you are trying to do:
The instruction TEST_WHEN
Sometimes it may happen that a condition could be tested only once, because such condition is not dependent on the records being scanned. For example one might want to test that in the selected set of members for a given dimension there is a specific keyword or that a certain cell of the cube has a specific value. Instead of applying the condition to the entire set or records to scan, the condition may be evaluated before the WHEN / ENDWHEN loop, with the following instruction:
*TEST_WHEN( )
The is a string that the logic engine will pass to VB script for evaluation. If the returned value is TRUE the subsequent WHEN / ENDWHEN loop will be processed. Otherwise the entire loop will be skipped.
Example:
// skip the loop if Budget is not among the passed categories
*TEST_WHEN(instr("%CATEGORY_SET%","BUDGET")>0)
*WHEN *
//u2026..
*ENDWHEN
*GO
// skip the loop if account FLAG is zero for a certain time,intco combination
*TEST_WHEN(GET(ACCOUNT="FLAG",INTCO="NON_INTERCO",TIME="2004.JAN")<>0)
*WHEN *
//u2026..
*ENDWHEN
As shown in the above example, the instruction supports the use of the %_SET% keyword. It also supports the GET instruction, to retrieve a value from the recordset. When one or more GET instructions are used in the evaluation of the condition, it must be remembered that all required dimensions must be specified. The non specified dimensions will default to the values they have in the first record of the source record set. In other words, the user can only omit dimensions that do not vary in the recordset being scanned.
Another syntax supported anywhere in this instruction is the FLD( ) keyword. Here is a valid example:
*CALC_EACH_PERIOD                         // handle periods one by one
*XDIM_MEMBERSET TIME=PRIOR, %TIME_SET%     // include prior period to selected dates
// This will test that the evaluated period is not the prior period
*TEST_WHEN(instr("%TIME_SET%","FLD(TIME.ID)")>0)
*WHENu2026.
The TEST_WHEN instruction is specific to the current GO section. If no GO section is specified, it is specific to the current COMMIT section.

Similar Messages

  • Java applet...support logical execution?

    my problem is:
    i am writing a programme for a microproccessor which i have eight (8) I/O digital channels.
    i want to set the digital channels high and into the programme i sent that: "0XFF" which mean =>11111111.
    well, after a treaty i want to change only one channel without affect the other channels.For example i want to set low the 3rd channel 11011111.i don't want to sent 0XDF but i want to do it with logical execution "OR" or "AND".
    Is this possible?and how?
    thank you in advanced

    I am nut sure if this is what you are looking for:
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/operators.html
    http://java.sun.com/docs/books/tutorial/java/nutsandbolts/relational.html

  • Advanced Search using conditional & logical operators+ sharepoint 2010

    Hi Team,
    We have an requirement something like this. we have to search values from Custom SharePoint List using Conditional & Logical Operators in SharePoint 2010. how can i achieve this ? if some one has worked on something like this, can you please share the
    details to my email id ([email protected]
    Thanks in Advance.
    Cheers, San

    Hi Santhosh,
    If you have only one list, then you can use CAML query to perform search in that list. You can write code to generate dynamic CAML based on selection in the filter.
    If have to perform the search function on multiple list then you can use Search object model and create dynamic query and execute it using Search OM.
    http://msdn.microsoft.com/en-us/library/office/dn423226(v=office.15).aspx
    Best Regards,
    Brij K

  • AC 5.3 - CUP - initiator attributes - conditional logic

    Is there a trick to making the conditional logic work correctly in CUP when trying to define/select the initiator attributes?   Even when I specify to use AND, it seems to still be adding the attribute with an OR condition.
    For our non-production provisioning,  I have a role that needs to be approved by different people depending on which system (i.e. Dev, IT, QA) it is being requested.  I am trying to set up the 2 initiators as follows:
    Initiator 1:  Application/System = DEV and  Role = Role 1
    Initiator 2:  Application/System = IT or QA    and    Role = Role1
    Edited by: Jane Yap on Oct 22, 2009 5:12 PM

    After playing around with this more,  it appears that if I am selecting Role as the attribute and use the search functionality (i.e. click on the magnifying glass) to specify/select the actual role/role name,  the conditional logic does not get set accordingly.   In order to get the correct conditional logic set (i.e. populate the one I actually selected),  I need to type the role name or pattern of the role name instead of selecting the role using the search functionality.  
    I guess everywhere else within GRC AC it's always best to use the seach functionality when setting/selecting field values  (as opposed to manually typing/entering the values) EXCEPT for when creating/changing CUP initiators.   Documented feature? Perhaps...
    Thank you to those who responded to my post.

  • Hiding conditional logic using JSF tags

    Hi
    I'm trying to encapsulate some logic which, dependent on a true / false validation, outputs either one component or another containing a value.
    For example...
    when the validation is true, output <h:selectOneMenu... containing all available values with selected value highlighted.
    when the validation is false, output <h:outputText... containing selected value.
    I've tried custom tags but I'm using this to write out very basic tags and I'd prefer to use the JSF HTML tags.
    The only option I can see is to write conditional logic in the JSPs to say:
    if valid = true
    <h:selectOneMenu...
    else
    <h:outputText...
    endif
    ...but this means the developers must do this for every occurrence and the pages contain lots of conditional logic.
    Is there any way to create a custom JSF tag which outputs JSF HTML tags as this seems to be what we want to do?
    Thanks D

    There is no tag for this, but every HTML component has a 'rendered' attribute which accepts a boolean expression. If it's outcome is true, then the component will be rendered, otherwise it will be hidden.
    Here are some basic examples:
    <h:someComponent rendered="#{myBean.booleanValue}" />
    <h:someComponent rendered="#{myBean.intValue > 10}" />
    <h:someComponent rendered="#{myBean.objectValue == null}" />
    <h:someComponent rendered="#{myBean.stringValue != 'someValue'}" />
    <h:someComponent rendered="#{!empty myBean.collectionValue}" />
    <h:someComponent rendered="#{!myBean.booleanValue && myBean.intValue != 0}" />
    <h:someComponent rendered="#{myBean.stringValue == 'oneValue' || myBean.stringValue == 'anotherValue'}" />

  • Conditional logic in sqlplus??

    Hi,
    Is it possible to put a condition around an SQLPLUS command? or run an sqlplus command (such as PAUSE) from within a PL/SQL block? do any packages allow this?
    I would like to be able to set a variable in a script which would override/bypass the pause command.
    Example: (if sql allowed conditional logic...)
    define(var) do_prompt = true;
    if do_prompt
    prompt Warning you are about to drop the database! press Enter to continue.
    pause
    end
    Thanks

    One way to do it is to select into a variable using
    col ... new_value ...
    and then use the variable as the name of another sqlplus script to run using START.

  • Conditional logic?

    Hi Everyone,
    I am attempting to add some conditional logic to a query. The basic premise is as follows (this query snippet does work!) -
    DECLARE @choice int
    SET @choice = 0
    IF @choice = 1
    BEGIN
    SELECT 'True'
    END
    ELSE
    BEGIN
    SELECT 'False'
    END
    I now want to go one step further by adding a SELECT statement that will ultimately determine how the @choice variable is set. 
    For example if a product code exists in the appropriate database table I want to set @choice to 1, otherwise set it to 0.
    If anybody can suggest how I can go about this it will be greatly appreciated.
    Kind Regards,
    David

    DECLARE @choice int
    IF EXISTS (SELECT * FROM TABLE WHERE Product = 'Product Name')
    SELECT @choice = 1
    ELSE
    SELECT @choice = 0
    You can make use of IF EXISTS as above.
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • Dreamweaver template and conditional logic

    I would like to create a DW template and show or hide content using conditional logic. Can this be done?
    Thx!

    tangonovember wrote: I would like to create a DW template and show or hide content using conditional logic. Can this be done?
    If the following quote is of interest to you, check out Chapter 14 of the CS3 DW manual.
    "An optional region is a region in a template that users can set to show or to hide in a template-based document. Use an optional region when you want to set conditions for displaying content in a document.
    When you insert an optional region, you can either set specific values for a template parameter or define conditional statements (If...else statements) for template regions. Use simple true/false operations, or define more complex conditional statements and expressions. You can later modify the optional region if necessary. Based on the conditions you define, template users can edit the parameters in template-based documents they create and control whether the optional region is displayed.
    You can link multiple optional regions to a named parameter. In the template-based document, both regions will show or hide as a unit. For example, you can show a “closeout” image and sales price text area for a sale item."
    Roddy

  • Logic Execution Algorithm - Help

    Help for me - Logic Execution Algorithm
    Considering the Execution Sequence 1: Consider the following information in the table GBI_PAR_DEFINE_ROTA parameterized.
    The required fields are filled in by users: Required_Res_1 and one of the fields:
    Product_id, customer_id or Sales_Order_No.
    Off the field will only be filled with the value N if you want to disable the rule. If the value of the rule is N, the routine being developed disregard the rule.
    REQUIRED_RES_1 PRODUCT_ID SALES_ORDER_NO CUSTOMER_ID OFF
    P_P_LAM2 P_289874 18669437-20 WHGA
    Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.
    Step 2: Within these sales orders, search through the table Works_Operation which ones have the field Product_ID = P_289874.
    Step 3: Restrict further data selection Sales_Order searching the table, which of them belong to the client WHGA.
    Step 4: In the records remaining in the table Works_Operation verify which code Alternate_Pref whose field Required_Res_1 equals P_P_LAM2. If more than one return Alternate_Pref (different) for the same product_id Required_Res_1 and generate a table of error called GBI_ERR_ALTERNATE_PREF, containing the following information: Required_Res_1, Works_Order and product_id. If this error occurs, the following steps should not be performed.
    Step 5: In the remaining records, delete those records whose field Alternate_Pref is different from the value returned in Step 4. IMPORTANT NOTE: The records can only be deleted if they exist for the same product_id Alternates_Prefs different. These same deleted records should be inserted in the table Works_Operation_Rota_Excluida.
    Step 6: Deleted records Works_Operation table must also be deleted from the table Works_Op_Char. Fields of connection between these two tables are: Works_Order_No, Version_No, Works_Op_No, Alternate_Pref and Op_Proc_No. Deleted records will be recorded in the table Works_OP_Char_Rota_Excluida.

    I did not offer an opinion.
    You have what is called a technical or program specification. It describes the programming steps that need to be designed and written. This is exactly what programmers do. And your seeming inability to do this, points to the fact that you are not a programmer. That is the issue you need to address - instead of looking for so-called algorithmic logic.
    Simple and basic approach. Take step 1. Write SQL code that satisfies the requirements and outputs of that step. E.g.
    Step 1: Find Table MP_WO_REP which records have sales order number 18669437-20.
    Code: select * from mp_wo_rep where sales_order = '18669437-20'
    Do the same for step 2. And the remaining steps
    You now have the basic code template required to perform these steps. The next actions are:
    Modularising the code (instead of a hardcoded sales order number, support specifying it as a parameter).
    Simplify the code (by combining and integrating processing steps). Real programming is said to be the act of removing program source code statements, and not writing them.

  • If condition logic

    Need ur help in writing a IF condition logic.
    I have written a code like
      IF itab-amt between 100 and 200.
      Result = itab-sales.
    endif.
    Now i want to change the logic to
    If itab-amt between 100 and 200 excluding 110 120 122 134.....
    result = itab-sales.
    endif.
    can u give me the code with correct syntax
    Regards..
    Balaji

    Hello,
    Try to do it using a range table:
    * After the declaration of the data object itab.
    DATA:
      lr_range LIKE RANGE TABLE OF itab-amt,
      ls_range LIKE LINE OF lr_range.
    ls_range-sign = 'I'.
    ls_range-option = 'BT'.
    ls_range-low = '100'.
    ls_range-high = '200'.
    APPEND ls_range to lr_range.
    ls_range-sign = 'E'.
    ls_range-option = 'EQ'.
    ls_range-low = '110'.
    APPEND ls_range to lr_range.
    ls_range-low = '120'.
    APPEND ls_range to lr_range.
    ls_range-low = '122'
    APPEND ls_range to lr_range.
    ls_range-low = '134'.
    APPEND ls_range to lr_range.
    IF itab-amt IN lr_range.
    ENDIF.
    Regards.

  • Conditional logic in Spry based on date?

    I have a list of links with expiration dates. All the links
    have expiration dates. If the link is expired, I still need to show
    it, but simply reformat the link so that it's just text, and grayed
    out.
    I have the date coming in XML in the format "mm/dd/yyyy". I
    also have a javascript function that gives me today's date in
    "mm/dd/yyyy", but I can't figure out any way to get the dates
    compared. Basically, I need something like, somewhere:
    "If expireDate =< todaysDate, then change the link style"
    As of right now, I've written a function that brings in the
    formatted date and does a document.write to write the Spry code,
    where I'm inserting the javascript date into a spry:if. However,
    that's not going to get me there as it's just comparing strings and
    not really dates. I need to find a way get Javascript (todays date)
    and Spry (date field from XML) to talk to one another (compare
    dates) and then decide what to do (change or not change link) and
    am stumped.
    I can't think how filtering the data will get me anywhere,
    since all the dates in the record set need to show up in one format
    or another. So it seems the logic for date comparison has to happen
    in Spry, but Spry appears unable to do this kind of logic. This
    lead me to writing a function, but then again how to get the Spry
    data and Javascript logic to converse....help!

    Hi,
    You can apply PPR on salary field. Then catch the event and based on condition, set the value of commission field.
    Also, you can check this link for PPR:
    http://sushantsharmaa.blogspot.in/2012/12/11-ppr-partial-page-rendering-in-oaf.html
    --Sushant

  • Conditional Branch Execution?

    OK, Newbie here (and a bit frustrated). First application in the works.
    I have 2 ways to get to a page. When I click on the "Create" button, I want to return to the page that called the current page.
    Call them pages 1, 2 and 3.
    The default branching (unconditional branch) is 1 to 3 back to 1. This is a report to form back to report. This is the structure generated when I added the page when I initially generated the application.
    The secondary branching (conditional branch) is 2 to 3 back to 2.
    I set the sequence of the branches to do the conditional branch 1st then the unconditional branch 2nd.
    The "back to 2" is the problem.
    When I set it to "Unconditional" it works. When I set a condition it doesn't work.
    I tried "Request = Expression 1". I set the REQUEST in the button on page 2 to a specific value ("RETURN_TO_2"), but I suspect that when I click the "CREATE" on page 3 the REQUEST value is set to something else.
    So I tried saving the value of the REQUEST from page 2 in a page item on page 3 (P3_X) and used "Value of Expression 1 = Expression 2".
    I tried "P3_X", ":P3_X", "&P3_X", "v('P3_X')" in Expression 1 and RETURN_TO_2, "RETURN_TO_2" in Expression 2 (I think all possible combination of the to expressions).
    None of the combinations does the conditional branch!
    Any suggestions as to where I should go next?
    Thanks - JR

    John:
    I have found it helpful to use the 'Branch to Page Identified by Item (Use Item Name) ' type of branch in such cases.
    I specify the the page to return to in an application_item. The application_item itself is populated by a before header application_process. So if 'G_DEST' is the application item then the application_process simply is
    :g_DEST:= :app_page_id;In your case the branch defined in page 3 will be of the 'Branch to Page Identified by Item (Use Item Name) ' type and use the application_item 'G_DEST' as the item that holds the page-number that is to be the destination for the branch.
    Varad

  • CUP Initiator Conditional Logic

    Hi All,
    How can I create an Initiator with below logic using 2 attributes "Request Type" and "Functional Area"?
    Initiator = (RequestType1 or RequestType2 or RequestType3) AND (FunctionalArea1 or FunctionalArea2 or FunctionalArea3)
    If this is not possible then is my option to create multiple initiators by splitting the above logic and then create a separate workflow for each initiator?
    Regards,
    Jay

    Dear Jay,
    You can use the logic as below
    Request type 1 or Request type 2 or Request type 3 or Functional Area 1 or Functional Area 2 or Functional Area 3
    If you use AND then the logic will take Request 1,2,3 AND Functional Area 1 ONLY and futher OR logic will not work for the other functional areas.   
    Thanks and Best Regards,
    Srihari.K

  • Default logic Execution

    Dear Experts,
    As we know when we input some data via Input Template the Default logic is called, I would like to confirm which file of Default logic is called whether .LGX (the Compiled code) or the .LGF (the UnCompiled code).
    Please Confirm.
    Thanks & Regards,
    Rohit

    Hi Nilanjan,
    Calling with DM package does not fulfill my requirement as I am working on scenario where Default logic is getting called after Data send via Input schedule and one of logic called in Default logic is having Select Instruction like:
    *SELECT (%TIMEIDS%,"[ID]","TIME","CALC='N' AND PERIOD<>'INPUT' AND YEAR IN (SELECT [YEAR] FROM mbrCATEGORY WHERE ID='%CATEGORY_SET%')")
    Now %CATEGORY_SET% variable will only gets processed if I call LGF version and this is why I need to call LGF version of logic in Default Logic.
    Thanks & Regards,
    Rohit

  • Default Script Logic Execution

    hi friends
    I created script logic & placed in default logic. I created Input Schedule and saved, but default script logic is not executed
    BPC 7.0NW version.
    What might be the reason?
    Joe

    Save the input schedule means you just saved an excel file into file server. Nothing else will happen.
    You have to send data from that input schedule or from other.
    Every time when you send data defaul logic is executed. Save of a excel file doesn't means send data.
    Regards
    Sorin Radulescu
    Edited by: Sorin Radulescu on Nov 2, 2010 11:50 AM

Maybe you are looking for

  • Methods in bapi used to convert data into XML

    Methods in bapi used to convert data into XML, how to implement those also, points will be rewarded Thank you, Regards, Jagrut BharatKumar Shukla

  • To upload QM master data in system

    We are in cut over face and analyzing method to upload master data. I know that we can upload inspection plan in system with CWBQM and LSMW tool, but is these any other method to upload inspection plan in system? Tom.

  • Sql Loader - Decimal numbers showing in null column

    Greetings, My apologies if this is in the wrong forum section. It seemed to be the most logical. I have added new column to a control file used in a sql loader upload and I am getting unexpected results. Long story short, I copy foxpro tables from a

  • One port - two devices

    Hi all! I have a problem about port 3074. I have Pc and I play Call of duty MW3 on it - the game uses port 3074, unfortunetely the same port is being used by Xbox Live. Is there a way to forward one port to both machines simultaneously? My router is

  • What is the best way to run internet explorer on Mac and IPad and is it safe to do so??

    I need to run internet explorer to access new billing software,  what is the best way to do so and is it safe to run this on macbook and ipad if possible??