If expressions

How do I create an expression if I want to return a value if another value is > or < a set value? For example:
if ( Subtotal < 25.00 ) then
ShippingCharge = 6.00
elseif ( Subtotal > 25.01 or < 50.00) then
ShippingCharge = 8.00
elseif ( Subtotal > 50.01 or < 75.00) then
ShippingCharge = 10.00
endif
I know this is not the correct syntax but it illustrates what I'm trying to accomplish.

The syntax is listed in the "Scripting Reference" under LiveCycle Designer's menu "Help" option.
if ( simple expression ) then
list of expressions
elseif ( simple expression ) then
list of expressions
else
list of expressions
endif
There are also examples available.
You could also use JavaScript and the "switch{case():...}" statement. Wich might more clearly state and test the comparisons.
What is the shipping charge if the Subtotal is $25.00, $25.01, $50.00 or $50.01? You have to be careful with the end points of ranges.

Similar Messages

  • SSRS Expression Month at a glance

    I have a report that I am trying to regress the payment sums out month by month. I know how to do this in SQL, but no idea in SSRS. Below is what I would like the table to look like.
    Year                             Month                 
    Total Payments       Month1            Month2             Month 3
    2012                              1                      
    10,000.00                2000.00          2000.00            6000.00
                                         2                      
    15,000.00                5000.00           1000.00           9000.00
    And this would go on. I have the report built to drill down by year and month and show the sum of the payments. What I can not figure out is how to break out the payments collected month by month. I hope this makes sense.

    Okay after much playing with this I have starting having success. This is what I want to do.
    =sum(IIF(Fields!MPaidDate.Value = Month(Dateadd(DateInterval.Month, 1, Fields!Date_Recieved.Value))
    and Fields!YPaidDate.Value = Year(Fields!Date_Recieved.Value), Fields!Amount_Paid.Value,0))
    My month 1 column I left out the dateadd and I got back the right values. But when I try to add 1 month with date add it returns false.
    Why do you need to write conditional expressions like this?Isnt it enough to bring MONTH(datecolumn) as a field in your dataset and use matrix control in your report? Add year to rowgroup and Month to column group to get data split up into monthwise. And inside
    data part add three columns to show your measure value ie.#of orders ,
        Balance 
     &  Total Paid  
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • In Photoshop Express, cannot sort images in album by filename in thumbnail view (for slideshow)l.

    In Photoshop Express, I want images to appear sorted by filename.  In the "view as a table" it sorts fine.  When I revert to the thumbnail view, the arrangement is random.  The dropdown "show" list does not offer an option for showing by filename.  If I select the"custom" option, it means I would need to sort 300 images by filename MANUALLY (!!!), a job that a computer does in milliseconds.  Anyone with a solution?  Thanks.

    fwiw, with my images in the 'Folder Location' view the photos are in order by their Windows filename. That is the same order as the hardcopy album the photos came from. So I then created a PSE Album. I selected all my photos and moved them into that album. The order of the pictures was retained in the Album. That worked out great. I wanted my PSE images to be in the same order. I thought I would do it with tags. But creating an album seems to work just fine.

  • Unable to capture via Blackmagic UltraStudio Express

    Hi,
    I'm having trouble capturing into Premiere Pro via UltraStudio Express.
    I have a macbook pro 15” retina, Adobe Premiere Pro CC 2014,  Desktop Video 10.1.4 (installed after PP), Ultrastudio Express, Ultrastudio Mini Monitor, Media Express, DaVinci Resolve 11 Lite.
    I can capture from a camera via SDI into Media Express.
    I can use LiveView and get monitor output with Resolve.
    In Premiere Pro preferences, Device Control I can see 'Blackmagic Device Control'.
    But I can't get any capture in Premiere Pro.  Following the directions in Desktop Video Manual February 2014, as I setup a new project in Premiere Pro, I click on ‘Settings’ under ‘capture’, but get no feedback.  If I proceed into a project, go to capture, I see no video from the connected camera.
    Any advice would be wonderful.  I’m trying to use this system for a green screen shoot on Monday. 
    Herb

    To my knowledge, if CC is up to date, it's up to date.  I checked and there are no updates.  Thanks.

  • BRF+ Message Log & "Rule as Expression"

    Hi colleagues,
    I am quite new to BRFplus and have two questions:
    1) I would like to use a message log action in order to indicate errors. I tried to follow https://wiki.wdf.sap.corp/wiki/display/FDT/Message+Log   with method SET_APPLICATION_LOG_OBJECT, but I can't find the class this method belogns to. I also tried modelling a rule & action message log with help of the UI. My question is how can I log messages and where can I find them after the function is beeing processed?
    2) In every guide I can read something about rule expressions and even how to create them (e.g. http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cc/85414842c8470bb19b53038c4b5259/frameset.htm), but in the workbench there is no possibilty of creating rules as expressions but only rules and rulesets (the rule is not part of the "Expression" node).
    I hope somebody knows what I mean
    Thanks a lot & kind regards,
    Ilijana

    Thanks a lot for your response!
    Could you tell me why using rules and rulesets is not recommended for 7.01 ? This could be interesting for my bachelor thesis.
    Thanks & Kind Regards,
    Ilijana

  • The expression is not being displayed in the alert inbox

    Hi,
    I have created an expression in 'Long and Short Text' tab present in the ALRTCATDEF transaction screen.
    The expression is "test Error in message &SXMS_MSG_GUID&". However if i goto alert inbox, this expression is not getting displayed. I tried putting this expression under Message title, Short text and Long text tabs. But no change in the result.
    In the above expression, SXMS_MSG_GUID is a container variable declared in ALRTCATDEF transaction screen.
    Same is the situation irrespective of the container variable being used - SXMS_ERROR_CAT etc.,
    I appreciate your early response.
    Regards
    Ganesh

    Hi Venkat,
    Without using BPM, you can think/try out with triggering an alert from UDF:
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Otherwise, you can use email functionality to notify the error message rather an alert....so that you can customize your output format/or error message required.
    Also check out this Michal's blog on ALERT Configuration..
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Hope this wull help.
    Nilesh

  • Report generation toolkit and signal express user step : problem of closing reference in "Stop" event

    Hi all,
    I'm trying to make a package of Vis to easily make Excel reports with Signal Express. I'm working on LabVIEW 8.2.1.
    I'm using the report generation toolkit, so I build a .llb from my project which contains all the hierarchy of my steps, but also the hierarchy of dynamic VIs called.
    I have made some steps, like "Open Workbook", "Write Data", etc.
    My steps run well, excepts one step : "Close Workbook".
    If my "Close Workbook" step is firing on "Run" Signal Express event, I have no error, so my reference is properly closed.
    But if my "Close Workbook" step is firing on "Stop" Signal Express event, I have an error "1", from "Generate Report Objectrepository.vi".
    I feel that I'm trying to use a reference which has been killed in the "Stop" step...
    I would like to know what exactly do Signal Express on "Stop" event and why my close function does'nt run well.
    Thanks,
    Callahan

    Hi Callahan,
    SignalExpress (SE for short) does the following on the Stop event:
    1. Takes the list of parameters that SE found on your VI's connector pane, and sets the values that the user set from the "Run LabVIEW VI" configuration page, if any.
    2. Then tells the VI that SE is running the Stop event by setting the Enum found on your VI's front panel. This in turn should produce some boolean values telling your VI to execute the Stop case.
    3. The VI is then run, with those values and states.
    4. SE checks to see if any errors where returned.
    5. Since this is the Stop event, SE releases the reference to the VI which it possesses.
    Questions for you would be, is the reference to your Workbook linked to a control on your connector pane, or held in a uninitialized Shift Register. If it's held in a Shift Register, SE would not be aware of it, and would not be able to affect that reference.
    Hope that helps. Feel free to post your LLB if it doesn't.
    Phil

  • Print a report from Application Express direct to a CUPS Printer

    Hi all, I'm new to this technology, is it possible to print a report from Application Express directly to a CUPS Printer? Can someone tell me in laymans terms how to do it? I find the terminology and documentation less than helpful.

    Jeremy,
    BI Publisher handles submitting reports directly to a CUPS printer. However, the APEX integration doesn't currently integrate with that portion of BI Publisher.
    Here's an options:
    Use the Java API of BI Publisher to build a custom Java program that would do this for you. Delivering to CUPS is part of the Java API.
    Bryan

  • I'm running Final Cut Express 2. How can I move entire project and application from one internal hard drive to another? Ran out of space on one drive. Thanks.

    I'm running Final Cut Express 2. My video project is 95% done and I've run out of space on my 500g internal hard drive. How can I (1) move the complete FCE program and video to my unused 250g internal hard drive and operate it from there and (2) how do I then purge all the FCE info from the 500g drive without losing anything from the 250 drive?
    Also, is it possible to change the aspect ratio from 4:3 to 16:9 when the project is finished? If so, how? I now know this all should have been done before I started. Thanks for the help.

    1. You can't move the application. It must remain on the system drive. Move your capture scratch folder to the external FireWire drive and use the reconnect function in the project.
    2. What's the media 16:9 or 4:3?

  • Sensor Mapping Express VI's performanc​e degrades over time

    I was attempting to do a 3d visualization of some sensor data. I made a model and managed to use it with the 3d Picture Tool Sensor Mapping Express VI. Initially, it appeared to work flawlessly and I began to augment the scene with further objects to enhance the user experience. Unfortunately, I believe I am doing something wrong at this stage. When I add the sensor map object to the other objects, something like a memory leak occurs. I begin to encounter performance degradation almost immediately.
    I am not sure how I should add to best add in the Sensor Map Object reference to the scene as an object. Normally, I establish these child relationships first, before doing anything to the objects, beyond creating, moving, and anchoring them. Since the Sensor Map output reference is only available AFTER the express vi run. My compromise solution, presently, is to have a case statement of controlled by the"First Call" constant. So far, performace seems to be much better.
    Does anyone have a better solution? Am I even handling these objects the way the community does it?
    EDIT: Included the vi and the stl files.
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:16 PM
    Solved!
    Go to Solution.
    Attachments:
    test for forum.vi ‏105 KB
    chamber.zip ‏97 KB

    I agree with Hunter, your current solution is simple and effective, and I can't really visualize a much better way to accomplish the same task.
    Just as a side-note, the easiest and simplest way to force execution order is to use the error terminals on the functions and VIs in your block diagram. Here'a VI snippet with an example of that based on the VI you posted. (If you paste the image into your block diagram, you can make edits to the code)
    Since you expressed some interest in documentation related to 3D picture controls, I did some searching and found a few articles you might be interested in. There's nothing terribly complex, but these should be a good starting point. The first link is a URL to the search thread, so you can get an idea of where/what I'm searching.You'll get more hits if you search from ni.com rather than ni.com/support.
    http://search.ni.com/nisearch/app/main/p/q/3d%20pi​cture/
    Creating a 3D Scene with the 3D Picture Control
    Configuring a 3D Scene Window
    Using the 3D Picture Control 'Create Height Field VI' to convert a 2D image into a 3D textured heigh...
    Using Lighting and Fog Effects in 3d Picture Control
    3D Picture Control - Create a Moving Texture Using a Series of Images
    Changing Set Rotation and Background of 3D Picture Control
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • Expression question

    I'm new at SSRS 2008 R2.  I need to return a value from PERCENT_NUM if DESCRIPTION = 'x'.  PERCENT_NUM is a numeric field and DESCRIPTION is a string field.  The DESCRIPTION field has multiple items that I need to turn into columns
    then list the equivalent value for the facility name.  The data is grouped by facility names.  I have a column called "Decreased Dosage [$]" and enter the expression below in the text box.  I have about 60 facility names and all
    but 1 are returning 0 values. 
    Thanks.
    =IIF(Fields!DESCRIPTION.Value=
    "Decreased Dosage [$]", Fields!PERCENT_NUM.Value,0)

    The table I'm getting the data from looks like:
    ID        
    Facility             
    Description      Value_Num
    1         
    facility 1          
    Blue                
    0.09
    2         
    facility 1          
    Red                 
    0.00
    3         
    facility 1          
    Green              
    0.20
    4         
    facility 2          
    Blue                
    0.12
    5         
    facility 2          
    Red                 
    0.02
    6         
    facility 2          
    Green              
    0.18
    7         
    facility 3          
    Blue                
    0.15
    8         
    facility 3          
    Red                 
    0.01
    9         
    facility 3          
    Green              
    0.15
    The results I'm trying to get are:
    Facility
    Blue
    Red
    Green
    Facility 1
    9%
    0%
    20%
    Facility 2
    12%
    2%
    18%
    Facility 3
    15%
    1%
    15%

  • Expression - First date and last date of current month, current year

    Hi
    I need to have 2 ssrs expression as I can use  as default parameters in my report where I can -  out from my Time dimension, get the
    first date of the current, current year - and one where I get last date, current month, current year.
    My data source is a SSAS cube and my timedimension is structured like this:
    [Time].[Days].&[2009-01-16T00:00:00]
    Any suggestions how to solve this ?

    Hi ,
    You can use below in Default Values in ssrs ;
    for first Day of current month and year
    ="[Time].[Days].&[" +Format(dateadd("m",0,dateserial(year(Today),month(Today),1)), "yyyy-MM-dd")+"T00:00:00]"
    output will be ;
    [Time].[Days].&[2014-09-01T00:00:00]
    For last day of current month and year
    ="[Time].[Days].&[" +Format(DateSerial(Year(Now()), Month(Now()), "1").AddMonths(1).AddDays(-1), "yyyy-MM-dd")+"T00:00:00]"
    output will be ;
    [Time].[Days].&[2014-09-30T00:00:00]
    Please correct me if I misunderstood your requirement.
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem.

  • SSRS using multiple select parameter in expression

    Hi,
    I am using parameters to create my query at runtime using data set expression.
    I have a multi select string parameter that gets populated using a query. I want to add this multi select parameter values to where clause in expression of mail data set. I am able to join the string and make it comma(,) separated but not sure how can I
    add single quotes(') to it.
    = join(Parameters!Column.Value,",")===>>a,b,c,d
    requirement===>'a','b' ,'c'
    Pls. guide

    make it like this
    = "'" & join(Parameters!Column.Value,"','") & "'"
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SSRS Dataset Filter expression query

    I have an SSRS report which has a simple dataset and accepts two date parameters, and filters the results based on a Position parameter. The Position parameter filter is:
    Expression: Position
    Operator: In
    Value: [@Position]
    I have now been told that each position has a few other aliases in the database against the Position column. i.e. For a Position of "Contractor" I now also need to return "Consultant" records, based on the same field. Note, only one Position
    can be selected at a time.
    I imagine I have to update the Value expression above to do something like:
    - When @Position in "Contractor" also return rows where Position is x, y, z (I am happy to hard code these)
    I have about 10 Positions each with one or more aliases - can someone help guide me on how to set up the expression?
    Thanks!

    Thanks Ione.
    Ok - I have set my parameter values in the value box, comma separated
    My dataset filter for the param Operator is set to IN and the value [@Position]
    However where I have multiple values set against a position I do not get any results (there is data in the DB)
    Do I need to do something different when setting the paramter values? i.e. use the expression and then a function to parse the comman separted values
    Or - something in the Filter to make the expression parse the incoming paramter?
    Thanks again

  • SSRS 2008 - Expression for totals in a Matrix

    Hi,
    I have a simple Matrix with the following groups:
    Row Group: Program
    Column Group: Employee
    I need to add a new total column on the right side of the matrix using a simple calculation but I haven't been able to find how to do that other than doing it on the query side. Here's how the Matrix looks like:
    Program
    Employee1
    Employee2
    Employee3
    New Column
    Program1
    45.0%
    0.0%
    87.5%
    Program2
    12.5%
    50.0%
    3.8%
    Program3
    28.8%
    1.3%
    8.7%
    Program4
    1.3%
    23.8%
    0.0%
    Total
    87.6%
    75.1%
    100.0%
    The new column should display the sum of each program divided by the sum of all totals....for example for Program1 the calculation should be (45+0+87.5)/(87.6+75.1+100) which should be equal 50.44% ...the same logic applies for the other
    rows.
    The number of columns (Employees) and rows (Programs) are dynamic, so they change according to who is seeing the report. I'm unable to reference the sum of the total at the bottom row, not sure what I am missing.
    Any input on this is greatly appreciated.

    Hi Cleber,
    I have tested on my local environment and your issue can be caused by you haven't include the scope in the sum function, please find details information below about how to do the calculation:
    Please design the matrix like below:
    You can find the Row Group name is "Program" and the Column Group name is "Empolyee", this will include in the sum expression as below:
    Expression1: =SUM(Fields!Amount.Value,"Empolyee")
    Expression2: =SUM(Fields!Amount.Value,"Program")
    Expression2: =Sum(Fields!Amount.Value,"Program")/Sum(Fields!Amount.Value,"DataSet1")
    Preview you will got the result like below:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Pass function name as parameter in SSRS expression

    I have a function (GetColumnFieldName) which returns string datatype
    Now I want to use this function in below SSRS expression
    =Code.GetDisplay("FirstName",Parameters!SelectedCols.Value,Parameters!DisplayCols.Value)
    At the above expression I want to replace "FirstName" with  function GetColumnFieldName which returns the same "FirstName".
    Please suggest.

    Hi Jajatibabu,
    If I understand correctly, you want to use GetColumnFieldName function which returns a field name to replace the “FirstName” in the expression you post.
    If in this scenario, we can directly use Code.GetColumnFieldName(parameters) to replace the “FirstName” like below:
    =Code.GetDisplay(Code.GetColumnFieldName(parameters),Parameters!SelectedCols.Value,Parameters!DisplayCols.Value)
    Note that we should type the correct parameters in the GetColumnFieldName function.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for