Syntax for using AND with a variable in Business Rule Source

I've never fully gotten my head around the AND/OR syntax of calc scripts. What I'd like to do is as follows in some basic pseudo code:
FIX( ("A97" AND [Selected_Entity]) OR ("B76" AND [Selected_Entity]) OR ("C63" AND [Selected_Entity]) ).
I want my webform's business rule to execute on the selected Entity in the form (eg. A97) ONLY if that entity is part of a restricted list of members (in this case, 3 entities out of 200).
Thanks for any advice!

Hi,
I am not sure if I have totally understood what you are trying to achieve so sorry if I have misread it.
But what you could do is set up a variable in the Bus Rule, lets call EntVar.
It is set up as a local variable of type member and dimension Entity with a run time prompt "Enter Entity"
Now in your script it could look something like this....
FIX(&CurrentYr, "Working".......)
"AccMember"(
IF(@ISMBR([EntVar]) AND ([EntVar]=="A97" OR [EntVar]=="B76" OR [EntVar]=="C63") )
AccMember=.......;
ENDIF
ENDFIX
Once you have tested the business rule, you can get your form to pass through the entity into the variable.
Is this what you are trying to do?
Cheers
John
http://john-goodwin.blogspot.com/

Similar Messages

  • Syntax for using a variable in an equation.

    Hi all,
    Simple question here.  What is tha appropriate syntax for using a variable in a calculation equation.  Specifically, I am taking an established curve fitting equation from my channels and trying to calculate it over a lineargenerated data set to extend the curve  beyond the original data sample.  Here is the small portion of script I have that will not work.  Thanks for any help.
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

    Hi Gloorious,
    I am using diadem script.  In my example above, for the equation, if I substitue a,b,and c with numerical values, the script runs just fine and the formula executes as desired.  Is there a way to place the variables there instead as I have tried to do (I was hoping it was just a syntax issue) or do I have to approach it a completely different way?
    This script will execute just fine:
    Call Calculate("Ch(""[5]/Air Consumption LG"")= 4 + Ch(""[5]/LinearGenerated"")*5+6*ch(""[5]/LinearGenerated"")^2")
    but this will not:
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

  • HT201070 I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    Thanks to Bobthefisherman & Turbostar.  Turns out I've got a corrupted disk (which I found out via "verify disk" on Disk Utility First Aid.  Previously, I never thought to verify disk -- only to repair permissions -- so I never knew my HD had been corrupted.
    Wasn't able to do a clean install of OSX10.6 because my SuperDrive only sporadically will load discs, so I am taking it to the Apple Store to see if they can do a clean install, and depending upon costs, get the Superdrive replaced. 
    The HD wasn't partioned by the way.  And I did have just over 40GB of contiguous space. 
    Thanks again.

  • How to use Decode with a variable

    Maybe you've seen this done.
    I want to take statement strMenu4 and subtract the previous value
    that is stored in an array as shown in strMenu5.
    My problem is this change as shown in strMenu5 produces
    an error code:
    ORA-00904 invalid column name
    So either I'm coding something wrong or it can't be done within the
    SUM(decode) construct. If I replace the variable with a literal
    like 1000 the code works:
    SUM(decode(name,'DBWR lru scans', c1.value) - 1000) DBWR_lru_scans
    but with an array variable or even a constant the code fails:
    SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, "
    Any ideas how I can use Decode with a variable and not have it interrupt it
    as a invalid column name?
    Thanks,
    Joseph Karpinski
    [email protected]
    [email protected]
    strMenu4 = "SELECT d1.instance, " _
    & " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
    & " SUM(decode(name,'DBWR buffers scanned', c1.value)) DBWR_buffers_scanned, " _
    & " SUM(decode(name,'DBWR lru scans', c1.value)) DBWR_lru_scans, " _
    & " SUM(decode(name,'db block gets', c1.value)) db_block_gets , " _
    & " SUM(decode(name,'consistent gets', c1.value)) consistent_gets , " _
    & " SUM(decode(name,'physical reads', c1.value)) physical_reads " _
    & " from dual, v$sysstat c1, v$thread d1 " _
    & " group by d1.instance "
    strMenu5 = "SELECT d1.instance, " _
    & " to_char(sysdate, 'dd-mon-yy hh24:mi:ss') start_time, " _
    & " SUM(decode(name,'DBWR buffers scanned', c1.value) - Array(2)) DBWR_buffers_scanned, " _
    & " SUM(decode(name,'DBWR lru scans', c1.value) - Array(3)) DBWR_lru_scans, " _
    & " SUM(decode(name,'db block gets', c1.value) - Array(4)) db_block_gets , " _
    & " SUM(decode(name,'consistent gets', c1.value) - Array(5)) consistent_gets , " _
    & " SUM(decode(name,'physical reads', c1.value) - Array(6)) physical_reads " _
    & " from dual, v$sysstat c1, v$thread d1 " _
    & " group by d1.instance "

    Re-posting in the SQL and PL/SQL forum.
    It's more appropriate.
    Thanks,
    Closing

  • Is it necessary to use semaphores with shared variables

    is it ok to use semaphores with shared variables to prevent race conditions or is that built into the shared variable?
    - James
    Using LV 2012 on Windows 7 64 bit

    Semaphores are more of a method to protect a section of code from executing, and as tst as said they won't really help you.  There is nothing inherently harmful about having 2 sections of code trying to write to a shared variable at the same time.  Nothing like a crashed program, scrambled value, or an error message.  What will happen is that whatever happens 2nd is the value that sticks.  So a shared variable can still have the possiblility of race conditions just like local and global variables if you are dealing with multiple writers.  That is really an architecture problem.

  • Is there a set up tutorial for using Outlook with iCloud

    I am using Outlook on my PC (windows 7 and Outlook 2010)
    1. Is there a set up tutorial for using Outlook with iCloud?
    2.  Please clarify, I don't need to set up a XXX@me email account to get iCloud to sync with Outlook, correct?
    3.  My emails appear to by syncing, but the Outlook Calendar does not sync its Pre-Cloud entries with my Iphone and IPad.  Is this what is to e expected? 
    4.  If I put a calendar entry on my PC's Outlook Calendar, it should sync with my Iphone and Ipad correct?  Again, what about entries that were made in Outlook before I signed up for iCloud? 
    I am hoping there is a simple step by step tutorial somewhere, because I am pretty disappointed with Apple about how confusing this is all becoming. 

    Hello:
    Sorry I can't bring you a solution but I am surprised your mail is working. Many of us with outlook 2010 seem to be having trouble sending. It seems apple's Pxx-smpt.mail.me.com server is rejecting the loging. I have tried it on three PC's with Win7 and Outlook 2010. It simply does not work after installing from the iCloud control panel. I have also manually configured the servers, encryption method, etc to no avail.
    On the positive side, Calenda and contacts does work. First time around, the claendar duplictaed everything but I manually cleans it out. The iCloud calendar is a seperate calendar in Outlook. It seems to perform a sync with your local calendar one time. From them on, I beleive you need to use the iCloud calendar to have the same appointments show on each device. I renamed the defaut iClouds calendar to "iCloud Calendar". It's definatelly confusing and not seamless. It would be nicer to sync your OL calendar permenantly so you don;t see two or more.
    Let me know your settings for iCloud email on Outlook. Try sending an email from the @me.com account.
    Thanks,
    Kevin

  • Question for using ORACLE with SOLARIS

    Hi Experts,
    I have worked Oracle with Linux in one of my projects 2yrs back and i was just a developer, used to write SQL Query, Creating Table and Objects.
    Now i got a question from TL which is
    Tell me about consequences for using Oracle with Solaris?
    I am not worked ORACLE with SOLARIS, Can some one give me the answer for this question with
    1. Difference between ORACLE with LINUX and ORACLE with SOLARIS.
    2. Advantages and Disadvantages Between ORACLE with LINUX and ORACLE with SOLARIS.
    Thanks,
    MuraliDharan V

    Hi MuraliDharan V,
    It would had been better if you had searched first;
    Here is one
    Advantage for Linux64-bit Versus Solaris-x86_64 OS in RAC
    And beside that your question is incomplete:
    -What Oracle? Database, etc
    -Which Version? 9i, 10g, etc
    Aside from that a simple search on google might have answered your question as well.
    But I think there is some new trend of dumping questions here before searching.
    Ex Senior DBA

  • Syntax for taking export with 'Query' parameter

    Hi all
    Please help me regarding syntax for taking export with query parameter

    Hi
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where empno=10'
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where ename='''SCOTT''Salman

  • Any sample for using Captcha with Oracle ADF ?

    Hi
    Thank you for reading my post
    is there any sample available for using captcha with adf faces ?
    thanks

    Hi,
    nott hat I am aware of. However, I started a project to build a custom JSF component using
    http://jcaptcha.sourceforge.net/
    Not sure when I have this finished, but the goal is to have this working with ADF Faces (not sure if it makes sense to bind the component to ADF though)
    Frank

  • Using variables in Business Rules

    Hello Experts,
    Do you know if it's possilble to declare (and use) text variables in Business Rules?
    I want to do some strings treatment (concatenation, substring) and I need to use variables.
    Regards,
    Rodrigo

    Hi,
    thanks for your answers.
    But without variables I don't know if it's possible to do the following:
    I have a member dimension (that is from text type) and I want to access to it's content and, with some string treatment, reach to a member that I will FIX.
    How can I access to the content of the text dimension member?
    I give you the example:
    Let's supose that the name of the text dimension member is TEXTMEMBER.
    For Example if I use @SUBSTRING("TEXTMEMBER", 0, 3).
    If I write the member like the above I'm not reaching to the content of dimension member....
    Do you know how to do this?
    Regards,
    Rodrigo

  • User Variable in Business Rule or Global Variable

    I wanted to call the User Variable value of Planning application under the Globel Variable of Default Value. Example I have created one Globel variable under the Default value the user varible value need to pickup so any thought how I can do this.
    I know in the Form if you use &UsrVar this will show the user variable value in the Data form but it is not showing the User Variable value in global variable or inside the Business rule.It is giving an error message there is no substitution variable has been defined. Please explain.
    Thanks in Advance,
    Irsh
    Edited by: 818693 on 17 May, 2011 7:22 AM

    Hi,
    User variables are meant to be used in web forms and web forms only. You can certainly pass their values to business rules when you used them in POV or page section of the form during save. All you need to do is to create another business rule (local or global) variable in business rule on the corresponding dimension and use it in your business rule. If you enable running the business rule on save and using the form values for variables options in form properties, business rules would replace the values of business rule variables with the values that are set in user variables.
    Cheers,
    Alp

  • Problem with two of my business rule triggers

    Good morning every one,
    I have a small problem with two of my business rule triggers.
    I have these tables:
    pms_activity
    csh_cash
    csh_integrate_leh
    csh_integrate_led
    and my process goes like this:
    upon approval of a row in my pms_activity table I have a trigger that insert a row in my csh_cash - and in the csh_cash table I have a trigger that will insert in the csh_ingerate_leh and csh_integrate_led.
    my problem is pms_activity does generate a row in csh_cash but the trigger in the cash does not fire to generate a row in the csh_integrate_leh and led tables.
    I have generated in the following order after I created my business rule:
    I have generated the table from the designer (server module tab)
    I have generated the CAPI from the head start utility
    I have generated the API from the designer
    I have generated the CAPI from the designer
    I have run the recompil.sql
    I have checked that my business rule trigger is enabled and should run on insert and no where restriction
    === this is my business rule logic ======
    l_rule_ok boolean := true;
    begin
    trace('br_csh001_cev (f)');
    csh_gl_pkg.csh_gen_integ_jvs(p_id
    ,p_ref_num
    ,p_own_id
    ,p_trt_id
    ,p_value_date
    ,p_description
    ,p_amount
    ,p_cur_id
    ,p_gla_dr
    ,p_gla_cr
    ,p_gla_pl
    ,p_gla_rev
    ,p_gla_eqt);
    return l_rule_ok;
    exception
    when others
    then
    qms$errors.unhandled_exception(PACKAGE_NAME||'.br_csh001_cev (f)');
    end br_csh001_cev;
    ==== end =======================
    Any help will be appreciated as I have struggled with this for two days.
    Thanks

    hmmm...
    Try resetting it again and restoring with the same backup file...
    Does the phone work properly once you've reset it before you try restoring? A lot of people here have experienced problems restoring from backups... could be worth forgetting about it and starting from scratch.
    You could try contacting your nearest Nokia Service Centre (www.nokia.com/repair) and see if they can do anything - it may need the firmware reinstalling or upgrading... possibly... give them a call though and see.
    Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
    Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5

  • Is it possible to use attachMovie with a variable ID reference?

    Hello:
    I am trying to write an attachMovie statement with a variable
    feeding the ID parameter. Is that possible?
    For Example:
    fadeInVar = '"LS_body_home_ID"';
    _level0.LS_hitArea_body.attachMovie([fadeInVar],
    "attached_LS_body", 1);
    I can't quite figure out how to write this. I tried an eval
    function as well...
    If you have any ideas, please let me know.
    Thank you!
    - Garrett

    I'm not so sure that this will even work but off the top of my head I can say remove the [] from around [fadeInVar].
    AS2... not sure if this will work. I know in AS3 it wouldn't. It would for sure work if you externalized your images/swfs from the library and used a moviecliploader to load in a swf/image from a URL.
    function loadFile(fileURL:String):Void
         var mcl:MovieClipLoader = new MovieClipLoader();
         mcl.load(fileURL, container); //Where container would be the display object (movieclip or Bitmap) that you wanted to load the item into.
         //To dynamically create something you can add the image into, do this
         var mcContainer:MovieClip = stage.createEmptyMovieClip("containerClip" + stage.getNextHighestDepth()");
         mcl.load(fileURL, mcContainer); //Where container would be the  display object (movieclip or Bitmap) that you wanted to load the item  into.
    Use of the above function would be:
    loadFile("images/image1.jpg");
    Let me know if that helps.

  • Best practice for using Muse with Lightroom?

    I'm creating a photography website. I use Lightroom to manage my photographs, and I keep the pictures for my site in Collections.
    In Muse, I'd like to have ALT text descriptions (or something similar) of each picture, so that search engines can see what's on my site.
    Is there a way to embed the descriptions into the image info in Lightroom, and have it export in a way that Muse picks it up?
    My problem is this: I've been creating ALT tags in my Muse slideshows (by right clicking on each image and selecting "Edit image properties..."). This works, but I lose my ALT tag if I export the images from Lightroom using any naming convention that doesn't maintain a consistent relationship between image and name. This makes it very difficult to manage my exports from Lightroom, especially if I want to add images or change the order of images.
    At the risk of providing too much detail, the reason I rename images on export is this: In Lightroom, my images are named with my client's last name and a sequence number. When I export them for use on my website, I want them to have a different name, primarily to protect my clients' privacy, but also to allow me to organize them easily in my slideshows. So for example Jones-103.dng gets exported as Checkerbox-Wedding-Photography-[nnn].jpg, where [nnn] is a new sequence number.
    Can anyone tell me a better way to manage this workflow?

    publish/subscribe, right?
    lots of subscribers, big messages == lots of network traffic.
    it's a wide open question, no?
    %

  • What are the steps for using Bobj with ECC

    Hi,
    I have the ECC 6 with EHP4 system, now i want to use BusinessObjects for reporting purpose. I dont have the BI installed, What are the pre-requisit for installaing and using Bobj with web intelegence and crystal report. Dose BI is must for bobj to work? Please explain in steps what are the things i have to do.
    Thanks
    Rajib Imran

    It looks like you are new to BOBJ. BI is the service name and BOBJ is the product name in SAP.
    Since you have not mentioned your version of BOBJ, I assume you are in the latest version...
    To date, there is no direct connectivity available between ECC and BI 4.0 (current release of BOBJ).
    You may need to use one of some of the following ways:
    1. Using Plug and play Rapid marts (using Data Services)
    2. Build your own custom marts (using Data Services)
    3. Building SAP BW and using SAP integration kit
    Having said, there is a plan for direct connectivity between SAP ECC and BI 4.0 in the upcoming enhancement to BI 4.0.
    Please refer the link below for more details:
    /people/tammy.powlas3/blog/2011/12/04/sap-integration-with-businessobjects-bi-40-feature-pack-3-asug-webcast-summary
    Hope this sets up your thought process
    --Vino

Maybe you are looking for