Possible to have if statement within filters code?

Hi
I have some filters set up, and have assigned some global vars to them, which I then use in my Filters code to display the filters:
myText:Filters [globals.data.glow1, globals.data.stroke1, globals.data.shad1]
Works perfectly.
Now I want to assign a global var to each global filter var to determine if it should be shown or not.  So...
globals.data.glow1On = true;
globals.data.stroke1On = true;
globals.data.shadOn = true;
... and then somehow incorporate these new vars into an if conditional to determine if the filter global vars get included in the myText:Filters code.
However, I cannot seem to code the if conditional into the myText:Filters code correctly.
I even tried seperating it out like so:
if (globals.data.glow1On = true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On = true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On = true) {myText:Filters [globals.data.shad1];
But Flash only makes the last filter true (kinda makes sense to me now why).
Is there a way to do it without having to make an if conditional with 7 permutations?
Cheers
Shaun

A: Possible to have if statement within filters code?

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

You are not coding the conditional properly.  "=" is for assignment, "==" is for comparing equality.
if (globals.data.glow1On == true) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On == true) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On == true) {myText:Filters [globals.data.shad1];
Also, a conditional evaluates whether or not something is true, so for Boolean values you do not need to explicitly compare them...
if (globals.data.glow1On) {myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) {myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) {myText:Filters [globals.data.shad1];
Lastly, for what I see that you showed, the conditionals are all missing their closing brackets, and while you can use them, the brackets are not needed for single command conditionals...
if (globals.data.glow1On){ myText:Filters [globals.data.glow1]; }
if (globals.data.stroke1On){ myText:Filters [globals.data.stroke1]; }
if (globals.data.shad1On){ myText:Filters [globals.data.shad1]; }
OR
if (globals.data.glow1On) myText:Filters [globals.data.glow1];
if (globals.data.stroke1On) myText:Filters [globals.data.stroke1];
if (globals.data.shad1On) myText:Filters [globals.data.shad1];

Similar Messages

  • Is it possible to have more than one Tax code per line item in Billing docu

    Is it possible to have more than one Tax code per line item in Billing document ?

    Hi,
    I have a different perspective there.
    If an item is applicable for two different taxes which are represented by two different tax condition types and these tax conditions are configured in the tax procedure, FTXP and so on....then these two condition records can have two different tax codes.
    We actually have this scenario in EU now, where EU talks about service tax in 2010 apart from the normal VAT. So now we have MWST and ZWST(Say)
    Now there are some materials which come with a service associated with it. So a service charge is also levied when the material is sold. So the material price will become applicable for VAT and the service charge becomes applicable for service tax. In this case, the tax classification of the customer will have two entries in sales orders updated in the fields VBAK-TAXK1 and VBAK-TAXK2 based on the sequence number of these condition types.
    Now based on different tax classification of the customer, we have 2 different tax codes representing different %of tax.
    Hope it helps

  • Is it possible to open a Jar within Java code

    Hey
    I am just wondering if it is at all possible to get java to run a Jar within the code. So the Jar is my update to my program and I have got it downloading from my site using the java code but now i want the code to open it for the user so they don't have to double click in on. Is this possible?
    Thanks

    Sure. The java.util.jar package.
    You might want to take a look at service providers:
    http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Service%20Provider

  • Is it possible to have an event within an event?

    I have an event named for my niece, and I have all the pictures of her in it. I'm wondering if it's possible to have events within events, so I can just have 1 event with her name, then when you click on it, sub-events named things like "Christmas" "Thanksgiving" etc.?

    no - events are time based and can not be nested - use albums and smart albums which can be placed in folders and folders can be placed in folders for that kind of organization - Europe folder containing France and Italy folders each containing cities as an example
    Events are just a very basic and inflexible organization for people to start with - albums, folders, keywords and ratings are where the power is
    LN

  • Possible to have dynamic content within a campaign?

    Is it possible to have dynamic content elements within an email campaign so that different content appears based on a recipient's interests?

    Hey there, Nope.
    BUT
    See the BC Blog

  • Is it possible to have an attachment within a pdf doc print at the same time the main doc prints?

    Okay, so this may be kind of a weird question.  We have some users who are wanting to add a page to an already existing xml document and correct me if I'm wrong, but I've read that it's not possible to add/delete pages from a pdf that's in xml format.  Since that is not possible, I have added the page to the xml document as an attachment.  Now what I am wanting to know is if it is possible to have the attachment print out at the same time as the main document.  We are using the latest version of Adobe Reader and I have access to Adobe Acrobat Standard 9 & 10 and then I have access to Adobe Acrobat Pro 7.  I've been unable to find anyting via google or by searching this forum so hopefully I'll draw out some kind of smart cookies and we'll get this figured out.  I appreciate any and all input!
    Thanks,

    I know of no way to do this with Reader or XML.

  • Is it possible to have a selectManyListBox within ui:repeat ?

    Can I have a selectManyListBox within a <ui:repeat> or that is completely wrong ? I can displayed the values properly , however I cant retrieve the selected items in my list.
    An error is displayed "myform:j_idt117:0:j_idt119:0:_t121: Validation Error: Value is not valid"
    <ui:repeat value="#{row}" var="t" >
    <h:selectManyListbox value="#{myBean.selectedItems}">
    <f:selectItem itemValue="#{t.attributeName[1]}"
    itemLabel="#{t.attributeName[1]}" />
    <f:selectItem itemValue="#{t.attributeName[2]}"
    itemLabel="#{t.attributeName[2]}" />
    </h:selectManyListbox>
    </ui:repeat>

    You can try using SSRS cascading parameter.
    http://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx
    http://markvsql.com/2013/08/ssrs-cascading-multi-value-parameters/
    Regards, RSingh

  • Possible to have Function to return Flex Code (ie: mx:Text text="hello world"/ )???

    I'm new to Flex and need to special case some functionality
    using XML...not all feed items come with images so I thought the
    best way to handle this was to pass each feed item to a function
    that can use if statements and then return the appropriate code
    back to the user interface:
    For example printFeed() would would return something like the
    following if there were an image:
    <mx:Text text="{XML.channel.currentItem.title}"/>
    <mx:Image source="{XML.channel.currentItem.img.url}"/>
    OR the following if there were NOT an image:
    <mx:Text text="{XML.channel.currentItem.title}"/>
    Is this the correct approach? Also, what is the correct way
    to invoke printFeed? {printFeed("..."))} throws parsing errors.
    THANK YOU!
    -Cole

    "Cole_62" <[email protected]> wrote in
    message
    news:gd2q5r$f08$[email protected]..
    > no i dont think this will work because i need to iterate
    through each
    > <item> in
    > the XML...below is an exmaple of possible tree structure
    of the XML:
    > channel
    > -->item1
    > ----->title
    > ----->imgs
    > --------->imgUrl
    > --------->imgUrl
    > -->item2
    > ----->title
    > ----->imgs
    > ---------->imgUrl
    > -->item3
    > ------>title
    > ------>imgs
    > ----------->(no imgs)
    >
    > i thought to handle this using something like the
    ATTACHED CODE below:
    >
    > ...i need to be able to go through each <item> and
    <imgUrl> (because i
    > dont
    > know how many (if any) there are!) sorry if my PHP
    background shines
    > through!
    >
    > THANKS!
    >
    > <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    > <mx:HBox>
    > <mx:Text text="{feed.currentItem.title}"/>
    > <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    > <!-- PSEUDO CODE I NEED HELP RESOLVING:
    > if ("{item.currentItem.imgURL}")
    > -->
    > <mx:Image source="{item.currentItem.imgUrl}"/>
    > </mx:Repeater>
    > </mx:HBox>
    > </mx:Repeater>
    How bout
    <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    <mx:HBox>
    <mx:Text text="{feed.currentItem.title}"/>
    <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    <mx:Image
    source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
    includeInLayout="{item.currentItem.imgURL.length()>0}"/>
    </mx:Repeater>
    </mx:HBox>
    </mx:Repeater>

  • Possible to have an applet within an applet?

    Hi. I am designing a GUI using swing. It has a Card layout ie. different tab screens. On one of them I want to implement a pannel within which the user can scribble.
    I have the code for a scribble applet. can I run that applet within a pannel in my GUI?
    how?
    or if not, how can place the scribble code in my GUI code to work only in that pannel on one of the tab screens?
    Yhis has me rightly puzzled, and I am sure there is a simple answer. I would appreciate any help on this matter,
    Thanks...

    I haven't tried this but it seems like it ought to work:
    Since Applet extends Panel, just add an instance of the Applet to your display as you would any other panel, then call its init() and start() methods.

  • DAX - IF statement and filters within calculated column

    Hi all,
    I've got a bit of a complex formula I'm trying to run, but I'm not quite there yet.  I don't know where/how/if I can place a filter within my IF statement for a calculated column due to so many variables.  I either get errors or wrong numbers. 
    Hope the following makes sense. 
    Here is my formula for the calculated column [Years Since Last Task]:
    =IF (ISBLANK([Last Task Date]) && ([Current Role]<>BLANK()), DIVIDE([Quarters],4), FLOOR(1. * ( today() - [Last Task Date]) / 365, 0.25))
    Problem:  I am getting "114.25" for Ken....but I want a blank result instead.  Meaning, I need to also filter out any name (row) who has a blank [Current Role].  How do
    I add a filter to this current formula?  Is one more step of filtering possible in this IF statement?  (Maybe I shouldn't use an IF statement, and try CALCULATE instead?)
    Below is the table 'Work' for you to see what's happening.
    Name
    Quarters
    Last Task Date
    Current Role
    Years Since Last Task
    John
    1
    1
    0.25
    Mike
    4
    2/7/2011
    3
    3
    Todd
    5
    4/20/2009
    4
    5
    Jeff
    9/1/2013
    3
    0.5
    Ken
    0
    114.25
    Steve
    2
    12/3/2011
    2
    2.25
    Nate
    2
    1/1/2014
    2
    0.25
    Greg
    1
    8/11/2013
    1
    0.5
    Ross
    4
    11/9/2010
    4
    3.25
    Hope all this made sense.  Let me know if you have any thoughts.
    Thanks,
    ~UG1

    you can use nested IF-statements here:
    =IF (ISBLANK([Current Role]),
    BLANK(),
    IF(ISBLANK([Last Task Date]),
    DIVIDE([Quarters],4),
    FLOOR(1. * ( today() - [Last Task Date]) / 365,0.25)
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • Is this possible? to have Logic statements?

    I have 1 Question
    1. Person selects a response and  video " A" States that it is the wrong Answer
    2. Person selects a response and  video " B" States that it is the wrong Answer
    3.  Person selects a response and  video " C" States that it is the Correct Answer.
    And then when the video is finished. It goes on to the next Question.
    Is this possible?
    Message was edited by: hcri

    hcri wrote:
    it would have to be within InDesign to the delivery platform for  iPad
    That statement does not make sense.
    These scripts run inside InDesign only. They move native InDesign objects around, and can import and export files. You can do some pretty neat things with scripts. I bet there is someone who can do your little video-game with a script.
    However, you are still working inside InDesign -- and since InDesign does not run on an iPad, the process stops here and now.

  • Is it possible to have the time code follow the footage on playback?

    Hey everybody.
    I searched the forums, but I didn't find anything relevant to my question.
    My question is, is it possible to have time code follow your footage on playback?
    For example, when I scrub along the clip, the clip will tell me the entire length at the first thumbnail, but then as I scrub along, there is no time code, so I am unable to know how far along the sequence I am.
    I was talking to a faculty member, and he was told to grab certain portions of the footage, and he is wondering if this is possible within iMovie '09. I know that this feature is available in iMovie '06 and Final Cut Pro (of course), but I just started working with iMovie '09 last week, and wanted to know if this is possible.
    Any help is appreciated, and please let me know if I need to further clarify my question.
    John

    If you click VIEW/SHOW PLAYHEAD INFO, you will see the timecodes as you scrub. (Consumer timecodes, not pro timecodes).
    This works if you imported your footage from a camcorder, either miniDV or AVCHD.
    However, if you have imported an analog file, or saved a DV file to a QuickTime File, you may just see the file creation date in VIEW PLAYHEAD.
    However, there is a trick to getting even these clips to display timecodes if you know the start time.
    First pick a clip. Make a copy and drag it to your desktop, just so you don't lose anything.
    Rename this copy in the following format clip-yyyy-mm-dd hh;mm;ss.current file extension.
    For example, clip-2001-07-14 09;30;45.mov (note the space between the day and the hour)
    This would be a .mov clip that starts with the first frame at July 14, 2001 at 9:30:45 AM
    Then import the clip into iMovie. You now have timecodes at the playhead.

  • Is it possible, when i call a vi from within my code, to pass to it parameters as input and to return some values too?

    Hi There!
    I am currently calling a vi from within my code. However, what i would like to do, is to pass it 2 int values when i call it and for it to return 2 int values when it is done!
    Any advice on how i can do this please.
    Thanks.
    Regards,

    Hi Matrix,
    is there a reason you do it this way? By Ref (it is called dynamically loading)
    If you place the VI directly on the BD of a VI you can just wire things up.
    Now if you need dynamically loading. hoover the open VI-ref function and right click on the type specifier and select create constant. Then right click browse, browse to your VI. Now you have the connector pane.
    But if I were you I just use VI directly, because you'll keep connections active between the two VI's
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Is it possible to have parameters within planning Sheets

    Hi - Is it possible to have paramaeters withing planning Sheets. I was able to save a macro successfully within a planning sheet. But wanted to know if we can pass parameters within a planning sheet.
    Thanks,
    Venkat

    You can pass parameters upto some extent. If you want to filter the MDX query then you can use InterlacePlanner.AddFilter method. e.g. InterlacePlanner.AddFilter "Customer", "ABCD"
    where ABCD is Customer dimension member.

  • Possible 2 have "page turner" or "page flipper" 'applications within IWeb ?

    *Possible 2 have "page turner" or "page flipper" 'applications within IWeb ?*
    Link: [http://www.panik.com/index.php?do=entersite]
    http://www.panik.com/index.php?do=entersite
    Hopefully I have inserted a link to the type of application I mean above.
    Otherwise please copy and paste into your browser
    PLEASE Please if any of you know or can make suggestions - I would really appreciate some info/ input.
    I am a fine artist and would love to have this feature in my IWeb website.
    thanks to any contributors
    best wishes
    Aine
    in chilly Edinburgh, UK

    The page size there appears quite small and, after the initial novelty of turning the pages, it could become tiresome leafing through many images.
    Why not use the new .Mac Web Gallery and link to it from your iWeb page?
    http://gallery.mac.com/emily_parker#100388&bgcolor=black&view=mosaic&sel=0
    ...On that page at lower left the viewer can choose from four different display modes and the Slideshow mode displays in +full screen+. Here are details about .Mac Web Gallery:
    http://www.apple.com/dotmac/webgallery.html

Maybe you are looking for

  • I want to know what generation my iPad is?

    Well it's second handed and I just want to know what generation is since they all look the same! (Generation-1,2 and 3)

  • Error message for changing artist

    I make home videos with Digital Blue. I got Quicktime 7 Pro to change them to m4v files so they can work with my video ipod. I got all of them except 2 at the moment to iTunes successfully. I'm trying to put our company name on the artist window yet

  • Validation rule using list

    i had x eo i make enity validator rule type : list rule definition from : city from operator: in List type query result : query: Select * From Bus_Trip_Benefits       Where Btb_City_From = :pbtr_City_From And       :pbtr_Rqst_Date Between Btb_Eff_Fro

  • RE_RHAKTI00 for future date

    Hi, Please tell me how can I activate the position through the report RE_RHAKTI00 with effect from future date. Ritu

  • Need help between windows 8.1 editions

    Please tell which editions of windows is better windows 8.1 pro or windows 8.1 enterprise???? please answer in terms of features provided..