Script for changing objects presence based on amount range

Hello,
Is there a way to change an objects presence (either a field or a subhead) based on the entered amount range in a numeric field? 
For example:
-The numeric field amount entered is a range between 1 and 49,999, then "Signature Subhead 1" appears.
-The numeric field amount entered is a range between 50,000 and 250,000, then "Signature Subhead 2" appears.
Etc.
Any advice for this script would be appreciated.
Thanks!

Hi Bruce,
Your solution worked perfectly.  If I was to expand the ranges (let's say to three ranges), would I just have to add another "case this" logic section such as this?
switch (true)  
case this.rawValue >= 1 && this.rawValue <= 49999:  
  SignatureSubhead1.presence = "visible";  
  SignatureSubhead2.presence = "hidden";
  SignatureSubhead3.presence = "hidden"; 
  break;  
case this.rawValue >= 50000 && this.rawValue <= 249999:  
  SignatureSubhead1.presence = "hidden";  
  SignatureSubhead2.presence = "visible";
  SignatureSubhead3.presence = "hidden";    
  break;
case this.rawValue >= 250000 && this.rawValue <= 500000:    
  SignatureSubhead1.presence = "hidden";  
  SignatureSubhead2.presence = "hidden";
  SignatureSubhead3.presence = "visible";    
  break;  
default:  
  SignatureSubhead1.presence = "hidden";  
  SignatureSubhead2.presence = "hidden";
  SignatureSubhead3.presence = "hidden";   
Appreciated,
Eric

Similar Messages

  • Scripts for changing the address of the user when they have been in the box for 6 months

    Scripts for changing the address of the user when they have been in the box for 6 months
    If users are in a folder for deactivated users and disabled users in Active Directory, and been there for 6 moths do: change email address in exchange to existing email address.old 
    Anyone have suggestions on how I can go about it?

    What is this "box"?  What is this "folder" you're asking about?  You'll likely get a better answer if you use standard terminology.
    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

  • Edit catt script for changes in in web appl server higher than 6.4 release

    Hello Guru’s,
    Will you help me in editing the CATT script for changes in Web application server release higher than 6.4 release, when I look for edit mode it was showing the following message. will anyone suggest me is there any way to make changes.
    “While I was choosing change mode it was displaying the above message ( Message No:TT005)”
    Full points for the answer

    It seems there there is no problem with my FireFox 7.0.1 on my Mac OSX 10.7.2. So, maybe you can solve the problem by updating your OS. The only minor problem here is that Firefox doesn't display in the Tibetan fonts that you choose, it always display in Kailas font for Tibetan.

  • Calculation Script to change a number based on quantity in another

    Hello - and thanks for the help - I have no real idea of what I am doing when it comes to writing script.  I would like the cost of something to change depending on the quantity ordered... ie. the more you buy the better price you get.
    (ie.  5 or less = $18.00, 6-10 = $17.00, 11+ = $16.00)
    How do I write a calc script to accomplish this?  Also, if the "Quantity" affecting the outcome is a result of a calculation itself will the code still work?
    I have uploaded a sample to the following:
    http://www.shupaca.com/Calc.html
    Thanks!

    Check the spelling of you field names with in your custom scripts.
    Some overall observations:
    Use the provided formats for fields unless you want to write your own format code,  validation code, or keystrokes code.
    Use the default value option to set default values of fields, so if the form is reset, the default value is restored. You can also access this value in code.
    Use the 'read only' parameter to lock field you do not want users of the form to update.
    Check the JavaScript console for errors. You misspelled the field name.
    Do not use a calculation event when another type of event can perform the same script,. Calculation order can become a problem. All field calculations are rerun when ever any field that is used in a calculation is updated, so by the end of your form you may have a significant amount recalculation of unnecessary calculations being performed.
    Setting the 'Scarf Cost' field to read only, default value of 18, and a 'Number' format with 2 decimal places and the "$" currency symbol and removing all scripts for this field, one could use the following "On Blur' action for the 'Scarf Quantity' field:
    var oPrice = this.getField('Scarf Cost');
    oPrice.value = oPrice.defaultValue;
    if (event.value > 5) {
    oPrice.value = 16;

  • Change Tax conditions based on amount

    Hi
    I want to change the Tax condtion for SD to post Tax based on amount. I want to post Zero Tax (use a different Tax code say A0 ) when the billing amount is less than 5000 JPY. For the same customer if the billing is JPY 5000 or a Tax of 9 % or say apply anothe tax code A9.
    VK12 does not provide amount based determination.
    Please help.
    Regards
    Rajesh

    Hi Rajesh
    If you want to change the tax condition ,If the billing amount is less than 5000 JPY and if the billing amount is more than 5000 JPY another tax code should come then maintain Upper and Lower Limts.Say for example, if you have two tax condition types ,then maintain those condition records using two tax codes. For A9 tax code assign 9% tax  and for A0 tax code assign 0% tax.In one tax condition type to which you will be assigning A0 tax code  ,maintain upper and lower limits.
    Regards
    Srinath

  • Script for applying object style to only tif, or eps or...(by extension)

    We need to apply object style to only eps files in doc, or tif.... How to do this? Maybe someone have a script?
    thanks

    @kajzica – I don't have a script for that, but it is scriptable. You surely mean that you want to apply the object styles to the container frame of the images, aren't you?
    A few minutes later – try the following ExtendScript (JavaScript) code:
    You could edit the names of the two object styles at the beginning of the script code.
    OR: you could first run the script, the script will add two object styles to the document that you can edit afterwards.
    The script will sort the EPS and the TIFs from the other image types.
    Make sure that all graphics are up-to-date and linked correctly!!
    //ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx
    //Uwe Laubender
    * @@@BUILDINFO@@@ ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx !Version! Thu Dec 12 2013 13:15:30 GMT+0100
    //Edit your style names here. Change the name between the two " " only!!
    //OR: edit your object styles in InDesign after running the script.
    var styleNameForEPS = "EPS-Containers-Only";
    var styleNameForTIF = "TIF-Containers-Only";
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    app.doScript(_ApplyObjectStylesToContainers, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Apply object styles to containers for TIF and EPS graphics");
    function _ApplyObjectStylesToContainers(){
    var d=app.documents[0];
    var allGraphicsArray = d.allGraphics;
    if(!d.objectStyles.itemByName(styleNameForEPS).isValid){
        d.objectStyles.add({name:styleNameForEPS});
    if(!d.objectStyles.itemByName(styleNameForTIF).isValid){
        d.objectStyles.add({name:styleNameForTIF});
    for(var n=0;n<allGraphicsArray.length;n++){
        //The EPS case:
        if(allGraphicsArray[n].getElements()[0].constructor.name === "EPS"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForEPS);
        //The TIF case
        if(allGraphicsArray[n].getElements()[0].constructor.name === "Image" && allGraphicsArray[n].getElements()[0].imageTypeName === "TIFF"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForTIF);
    }; //END: function _ApplyObjectStylesToContainers()
    Uwe

  • Need shell Script for Invalid object

    Hi All,
    Can anyone post me a script for checking the invalid objects in 10g/11g database.
    The should should check for invalid objects,recompile and sent the email .

    I could think fo something like below(And applicable to multiple SID's running on the server) and i tested it it works(bash shell script)
    Assumptions:
    You have environmental file to set ORACLE_HOME ORACLE_SID
    say in this example
    /oracle/env
    ls -ltr
    env_ORCL.sh
    env_TEST.sh
    env_HR.sh
    You also have uuencode rpm installed to use along with mailx command(or else get it installed not big deal). uuencode is required
    to send as mail attachment
    1)I have kept SID list in file (/oracle/INVALID directory for eg)
    cat SID.lst
    ORCL
    TEST
    HR
    If you have lot of SID's you can populate the file using ( ps -ef|grep -i pmon | grep -v grep | awk '{print$9}' | sed 's/ora_pmon_//g' > SID.lst)
    2) Here are the list of SQL's(/oracle/INVALID directory
    cat invalid_pre.sql (For listing invalid objects per instance)
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    cat invalid_compile.sql--to recompile invalid objects
    set echo off
    set termout off
    set feedback off
    @?/rdbms/admin/utlrp.sql 4; (Note you change degree 4 or 8 accordingly)
    exit;
    cat invalid_post.sql--to list post recompilation
    set echo off
    set heading off
    set time off
    set timing off
    spool invalid_post.log append
    break on instance_name
    select instance_name , a.*
    from (select owner,count(*) from dba_objects where status='INVALID' group by owner) a, v$instance;
    spool off
    exit;
    3)here is the shell script
    cat invalid.sh
    for i in `cat SID11g.lst`
    do
    cd /oracle/env/
    source env_$i.sh
    cd /oracle/INVALID
    sqlplus "/as sysdba" @invalid_pre.sql
    sqlplus "/as sysdba" @invalid_compile.sql
    sqlplus "/as sysdba" @invalid_post.sql
    done
    uuencode invalid.log invalid.log | mailx -s "Invalid" <your mail id>
    uuencode invalid_post.log invalid_post.log | mailx -s "Invalid" <your mail id>
    4) Finally run the shell script, hopefully you should receive email :-)
    I have tested it on bash
    ./invalid.sh
    Once tested you can schedule it in cron
    Edited by: vreddy on Jul 19, 2012 9:57 AM

  • Is there a script for changing layer names in ID CS4?

    I have multiple documents with an average of 20 layers in each. Each of the layers is named for the expiration date of the coupon in the ads. When a new order comes in I retrieve the previous files and change the dates via scripts and the Find/Change option. I have looked but cannot find a way to rename the dates in the layers as well.
    Does anyone know of a script for this?
    Thanks in advance!

    E-mail, eh? You're missing out a lot of fun stuff, as there is
    - editing your own posts
    - using bold and italics to highlight important stuff
    - finally being able to shout (some posters think it's necessary to use a large bold font to make their post stand out in the crowd. They are correct, it does. In the Bad way.)
    - inserting images
    - uh, Jive (-- sorry, couldn't think of any more fun stuff to add)
    Visit the scripting forum (using a web browser, s'il vous plait) by clicking here.

  • WLST script for changing password for userid in Weblogic 9.2

    Hello Everyone,
    We want to change password for userid in weblogic 9.2. Is there a way we can do this by using WLST script? If so please provide me with steps for doing that using WLST. Thanks in advance.
    - - Weblogic Consultant

    Did you try going to the WLST documentation and searching for it? Go to [http://edocs.bea.com/wls/docs92/pdf/config_scripting.pdf] and search for "Changing a Password". The example there seems to be what you need.

  • Script for changing tif links to jpeg

    Hi,
    I have a file linked to a bunch of tifs. I've run a script in PS converting those images to jpeg. I could manually change each link, but I'd much rather use a script to go through my doc and convert my link urls from *.tif to *.jpg
    Has anyone come across a script for this? and if not, I can build one, but I'm having trouble finding the InDesign Scripting Reference pdf. Can someone point me in the direction?
    Thanks,
    Stan

    I attached a new version of the script, but I haven't properly tested it yet.
    Is there a repository of InDesign scripts online somewhere? if there isn't there oughtta be....
    Here is Scriptopedia by Loik.
    I started a new page on my site where I want to post scripts for download and links to scripts on other sites, sorted by categories.
    There are loads of scripts on InDesign Exchange, but some of them are quite outdated — it takes ages to post scripts there.

  • Script for changing InCopy assignment locations globally

    I have a book with multiple documents with hundreds of separate stories. I need a script to change the assignment locations globally within the ID document to a single folder. As it stands now, I can only change them one by one using their individual Assignment Options dialogue box in ID. Also, it would be nice to also be able to change the "Assigned to" field to a specific set of person(s).
    Someone had written a script a while back for ID2 that did just this but I can't seem to locate it. Not sure it would work with CS3.
    Anyone have any ideas?

    As Andbrowny asked, have you tried using OS X's Locations? See KB 106653, Using network locations in Mac OS X.
    If that doesn't give you the power that you need, checkout Location X.

  • Generating .sql script for all objects of a User/Schema

    Hi All,
    What are the ways in which I can generate scripts for a full USER (all objects) with dependencies. (by dependencies I mean for example that PK be created first before creating FK).
    We can export the full schema using (exp rows=n) but this will generate a .dmp file. I want a .sql file which can be run on any other machine (from SQL> prompt) so that user and all objects are created (without the need to use "imp").
    Thanks
    -AKJ

    But the easiest way to do this would be to do an export with rows=N and then an import.
    You coule do an export and then let run the import utility with indexfile=<you_name_it>.sql and this way you'll get a file with all statements included (but table definition commented out).
    Or you do it yourself (DIY-method), where you have to select all your relevant objects and their dependencies.

  • Reason for change of Infotype Based on Company Code

    Hi Experts,
    I have a requirement where I need to restrict the F4 HELP in
    PA30 Transaction for the infotype 15  based on company code for the field reason for chagne.
    I know that reason for change of infotype are maintained in the table T530E.
    But can this be restricited through SPRO configuration.
    Thanks in Advance.
    Regards,
    IFF

    Hi.
    It's possible to change the search helps with a search help exit.
    Take a look in SE11 for search help H_T530E.
    Search help exit
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    Regards.

  • Simple Script for Multiple Objects?

    Someone recently helped me with setting an opacity level for an object using this one line script and binding a keyboard shortcut to it: app.selection[0].transparencySettings.blendingSettings.opacity=50; (Pressing "5" sets the object's opacity to 50%)
    Although the script works perfectly for one object, when mutiple objects are selected it only affects the first selected object. Can someone show me how to get this script to affect multiple objects at once?
    Thanks in advance!

    Thanks for the help man, but what's with the snarky comment? lol. Yeah I use my "5" key daily as well. But in ID it does nothing while in the default context, so why not put it, and the other digits to use to quickly set object opacity? (this function is similar to setting opacity for Photoshop layers by the way).
    Have a nice day, and cheer up. Spring's almost here.

  • Is there a script to change paragraph style based on even/odd page

    Is there a script or way to have paragraph style change between 2 styles based on the text being on an even or odd page? 

    @JustMikey – as I understand your task, the problem has nothing to do with "special" paragraph styles, but (nearly) all with anchored objects (the images and parts of the gray bar) and appropriate margin settings.
    Just see the following IDML file I exported from InDesign CS5.5:
    Dropbox - ImagesAwayFromSpine-CS5.5.zip
    ImagesAwayFromSpine-CS5.5.zip
         ImagesAwayFromSpine-CS5.5.idml
         080731_Manchester-xxl_Grau.tif
    Of course you could add paragraph styles to format the data automatically or optimize in other ways.
    That's up to you. But you can see the principle:
    Inspect the Anchored Object Options for the image and the gray bar. Also the frame fitting options for the image.
    Note: See also the margin settings, that are not exactly mirrored on even and odd pages (for good reason).
    Uwe

Maybe you are looking for