How to Visible/Hide an Item based on the value of another Item

Hi
I need to visible and hide a textitem based on the value of another item.This form has 3 blocks, and the both item is in the first Master Block.
My code is:
if :RECORDTYPE=7 then
     Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_TRUE);
     Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_TRUE);
ELSE
     Set_Item_Property('BLOCK.ITEM',VISIBLE,PROPERTY_FALSE);
Set_Item_Property('BLOCK.ITEM',ENABLED,PROPERTY_FALSE);
:BLOCK.ITEM:=NULL;
end if;     
I wrote the code in the Validate Trigger, but not working when moving Next Record & Previous Record
Thanks in advance
Rizly

Read the 'Propagation of Property Changes' section towards the end of the page for Set_Item_Property in the online help. I'm not sure what you mean by locking automatically but perhaps it's because of this.
You should also ensure the item you're setting to invisible is not the current item (check :system.cursor_item and go to a different item if necessary).

Similar Messages

  • Validate an item based on the value of another

    I have two fields on my application, one that determines the type of record I am creating and another that holds the severity. The severity is only required when a certain type of record is created. So a item level validation item doesn't seem to work since the form is not posted yet and it does not know what type of record it is yet.
    Does anyone have any ideas? Ideally I do not want to post the record to the database first.

    Just to put some closure to this, my work around is:
    Put all the Select List (with Redirect) fields first. All the other select lists dependent on them come after obviously, and then all the normal text fields come last. The App can work like that and still present a logical work flow.
    The issue of cleared fields only shows when creating a record, even though all field sources are with Only if Null....I guess they are going back to their original values of NULL when the redirect takes place. Using Select List (with submit) just does not work - too much fooling around with conditional page processing etc. has to be done.
    So to sum up:
    1. Set all field sources to be filled Only when NULL.
    2. Use Select (or radio) "with redirect" for fields which control the LOVs or conditional showing of other fields
    3. Put all user typed entry fields after the Select/Radios with Redirect fields so you don't lose information typed when the Redirect takes place.
    Bill

  • How do i show a button based on the value of another button (value is greater then 0)

    I'm am building a form in indesign, and just want to add a visual icon next to buttons when they are filled out... check mark next to a drop down list... so the list have values and i want the check mark (button) to show only when the value of the drop list is greater then 0... can this be done?... easily?....
    thank you!

    Hey Gilad D,
    its been a while since i have been back to this project…..
    now i have time to dedicate to this to get it done….
    if you don't mind i really could use a little help..
    i want to start again and give you the full scope of what i am trying to do, i don't have any real hard files yet...
    its pretty simple (in theory)..
    So i don't know what you do for work, but i work in an environment that has some pretty lazy sales people,
    so i want to create a pdf that steps them through a bunch of questions that they have to answer...
    my thought was, lets break this out into sections…
    so section one has three questions, if they answer all three, then they get a checkmark and section 2 appears
    which would have a few questions in it… etc….
    there would be some easy cross referencing and excel type calculations,… and a few, if you answer yes then another field gets auto filled..etc….
    can acrobat handle this?… or am i wasting time thinking it can?...
    i primarily work on mac's but we do have a PC with live cycle...
    thoughts?….
    thank you,
    ely

  • Validating an attribute based on the value of another while inserting

    Hi guys
    I need to validate an attribute based on the value of another attribute.
    Example:
    inside some entity I have the following validation function
    public boolean validateAtt1(Number data){
         if (this.getAtt2() < some vlaue)
              return false;
         return true;
    this function works fine when I'm updating a record, but when I'm inserting a new record the this.getAtt2 return null, now I don't want to override the validateEntity function I want to override the validate function for att1; so in other words is there a way to reach att2 in the validation function of att1 when I'm inserting a new record, because the this.getAtt2() returns null if I'm inserting a new record.

    Using attribute-level setter methods won't work because when the value of a particular attribute is being set, the values of the other attributes might not yet have been set. This explains for example why it does not work when inserting a new record. You therefore have to validate at entity level.
    Rather than coding on the validateEntity() method you use a built-in Validator or Method Validator. When recording validators like this, you can provide a separate message for each business rule. If you also have the bundled exception mode enables (which will be the case by default for web applications), then multiple messages can be shown at the same time.
    If you have one business rule involving two different attributes, for example a and b, and you must provide different messages based on if a is causing the violation or b, you can do it like this:
    - implement one method doing the validation and that will indicate which attribute is causing the violation
    - implement two different method validators (with two different messages) that call the method doing the actual validation and return false based on the attribute causing the violation
    For more information about implementing business rules in ADF BC, you might have a look at this white paper:
    http://www.oracle.com/technology/products/jdev/collateral/papers/10131/businessrulesinadfbctechnicalwp.pdf
    Jan Kettenis

  • How to hide a field based on the value of a field in a different subform - null check doesn't work!

    I'm using Javascript to set the actions. I need to hide a text field if the value of a field in another sub-form is null.
    - tried checking the value of the other field for null - doesn't work
    - tried setting a variable str2 where I know the value of the other field is available then checking that variable when I initialize the text field - doesn't work
    What am I missing?

    Hi.
    Try this in the originating sub form referring to the text field (X). 
    if (this.rawValue = 1)
              X.presence = "visible";
    else if (this.rawValue = null)
              X.presence = "hidden";

  • Display an exception on one keyfigure based on the value of another key fig

    Hello all,
    How to run a exception based on some condition i.e
    i want to highlight the sales(key figure) which r less than the  average sales..
    where sales and average sales r keyfigures...
    i also created a cal key fig which has has value 1 if sale > avg sale...
    i.e How do i display an exception on one keyfigure depending on the value of another keyfigure??
    plz reply its urgent...
    thnx in advance...

    Hello Ajay, did you got an answer for your problem? I'm interested...
    Thx Masen
    Edited by: Masen-Fuad Marei on Nov 25, 2009 6:26 PM

  • Populate one text field on a form based on the value in another

    I am new to APEX and building my first application.
    When a user enters a value in one field, I would like to run a SQL command and then display a value in another field based on the value in the first field. For instance, if a user enters a part number in one field, when they tab off of the field, I would like to display the name of the part in the part name field.
    Thanks

    Thanks. That put me on the right track. I used that link to find the link http://htmldb.oracle.com/pls/otn/f?p=11933:11:2890374750690437 and then using the two was able to put together a solution.
    I am down to one last issue. I am able to return the name back from the process and display it with an alert statement. Unfortunately, I am unable to display the value on the form.
    I am doing the following.
    <script language="JavaScript1.1" type="text/javascript">
    function f_getCustomerName(id)
    var v_id = id;
    var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=getCustomerName',$v('pFlowStepId'));
    get.addParam('x01',$v('P2_CUSTOMER_ID'));
    gReturn = get.get();
    get = null;
    gReturn = (!gReturn)?'null':gReturn;
    /* The below do not work
    $s('P2_CUSTOMER_NAME',gReturn);
    document.getElementById('P2_CUSTOMER_NAME').value = gReturn;
    document.getElementById('P2_CUSTOMER_NAME').value = 'TEST';
    alert(document.getElementById('P2_CUSTOMER_NAME').value );
    alert(gReturn);
    //-->
    </script>
    Process: getCustomerName
    declare
    l_customer_id customer.customer_id%type;
    l_customer_name customer.customer_name%type;
    begin
    l_customer_id := to_number(wwv_flow.g_x01);
    select customer_name
    into l_customer_name
    from customer
    where customer_id = l_customer_id;
    htp.p(l_customer_name);
    end;

  • Sorting an array based on the value of another array

    Hi
    Ive got 2 arrys... An Integer[]{11,12,23,24,25};
    and another one double[]{60,79,83,54,67};
    i wanna sort the first array based on the values of the second array..
    ie my result should be double[]{83,79,67,60,54} and
    Integer[]={23,12,25,11,24}...........
    is thr any easy method to do tis..

    You should make a class with the int and the double as fields; and have your class implement Comparable to compare on the double the way you want; and just have an array of objects of this class, and sort it.
    Because the corresponding elements in your arrays are essentially linked, so they should be together.
    Edited by: spoon_ on Apr 12, 2008 2:17 AM

  • Is there a way to enable/disable a tabular form item based on the value of a second item?

    Hi Everyone,
    I have a tabular form based on a collection.   The column c050(maps to f30) will be either Y/N.  If it is Y, then I would like to enable column c024( maps to f24) (which happens to be a radio button based on lov).  If the value of c050 = N, then disable c024.   There are potentially many rows, and the item c024 would only be enable/disabled for the specific row.   So if row 1 has c050=Y and row 2 has C050=N then row 1 c024 is enabled, and row 2 c024 is disabled.  Hope that makes sense.
    I have created a dynamic action called enable/disable HMS fields.
    event=CHANGE
    selection type = jquery selector
    jquery selector = input[name='f30']
    condition EQUAL TO
    value Y
    true action1 - enable, jquery selector, input[name='f24']
    true action 2 - alert, You have added an HMS Species.   There may be additional data to enter.  thanks
    false action1 - disable jquery selector, input[name='f24']
    false action2 - alert, no hms worries.
    The alerts in both cases show properly...but nothing seems to happen to f24.....what am I doing wrong?
    thanks

    Agh! This is the first time you mention this is a radio button!  That changes things a lot! As you can see, the format is different (f24_0001_0001) than what we have discussed (f24_0001).
    Radio buttons have their own quirks.  My bad, I should have asked what you had.  But since you said your original selectors on input were working I just thought these were text fields or something like that.
    How about you change it to a drop down list just so that you can see all work?  And fully understand it.
    Then you can work out the radio button option.
    If that doesn't get you there... I'm going to ask you setup an example in apex.oracle.com and give me credentials to log in and take a look.
    I could re-try the js on my side with a radio but it will take some time.
    So just to be clear... f30 is a drop down and f24 is a radio?
    See, this line:
    $x_disableItem("f24_" + row, true);
    Is NEVER going to find the radio buttons because it's missing the 3rd 0001 and 0002 (how many options do you have?)
    So perhaps you try it like this:
    $x_disableItem("f24_" + row + '_0001', true);
    $x_disableItem("f24_" + row + '_0002', true);
    ... keep going for the options...
    Do the same for the false of course.
    But I think this needs a better approach if you'll have radio buttons.  I just need to work it out.
    Ok, go try things...
    Thanks
    -Jorge

  • How to modify F4 help of one parameter based on the value of another?

    Hi,
    My Query is as follows:
    I have 3 select-options / parameters on the selection screen.
    If I enter some value in the first parameter the values in the second parameter should reflect accordingly.
    For example: The 3 selection-screen parameters are:
    select-options: s_werks for pa0001-werks no intervals,
                          s_btrtl for pa0001-btrtl no intervals,
                          s_kostl for pa0001-kostl no intervals.
    On exceuting the report, say I do a F4 and select '1000' for the first parameter (s_werks).
    Now after selecting the value for the first parameter if I do a F4 on the second parameter (s_btrtl) then it should prompt me with a F4 help containing values only corresponding to '1000' entered in s_werks and not all the values maintainined for btrtl.
    I have tried AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_BTRTL-LOW.
    And then used the FM F4IF_INT_TABLE_VALUE_REQUEST.
    But At Selection-Screen On Value Request the selection screen parameter s_werks does not show any value. It reflects the value only once it reaches Start-of-selection.
    Can anyone please guide me how to go about it?

    hi
    Please do it in this way..
    TABLES: pa0001.
    select-options: s_werks for pa0001-werks no intervals,
    s_btrtl for pa0001-btrtl no intervals,
    s_kostl for pa0001-kostl no intervals.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_BTRTL-LOW.
      PERFORM sub_pop_btrtl .
    *&      Form  sub_pop_btrtl
          text
    -->  p1        text
    <--  p2        text
    form sub_pop_btrtl .
    DATA :  l_wa_dynp TYPE dynpread,
            l_i_dynp TYPE STANDARD TABLE OF dynpread,
            l_wa_temp LIKE LINE OF S_werks.
    REFRESH s_temp[].
      l_wa_dynp-fieldname = 'S_WERKS-LOW'.
      APPEND l_wa_dynp TO l_i_dynp.
    Get the screen values of template
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = sy-repid
          dynumb               = sy-dynnr
        TABLES
          dynpfields           = l_i_dynp
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
      IF sy-subrc <> 0.
    Do Nothing
      ENDIF.
    Put the screen value in the select-options
      READ TABLE l_i_dynp INTO l_wa_dynp INDEX 1.
      l_wa_temp-sign = 'I'.
      l_wa_temp-option = 'EQ'.
      l_wa_temp-low = l_wa_dynp-fieldvalue.
    Now you use l_wa_temp as plant field
    endform.                    " sub_pop_btrtl

  • How do I display an image in Numbers based on the value of another cell?

    Here is the situation. I have a list of names in one table. I then have a table of pictures of corresponding to each name. I then have a drop down list in a cell with each of the names in it. I would like to be able to click the drop down list, select a name, and then have the corresponding picture be displayed in a cell. How would I go about doing this?
    Late 2013 rMBP with fully up to date software.

    not possible.  I have wanted to do this myself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"

  • How do I se a checkbox to change the value of another cell?

    I am trying to create a spreadsheet for a job quote sheet. In column A I am inserting checkboxes, in column W i have the price of that particular option that coincides with that product. What I am trying to accomplish is if I select the checkbox for an option, the cost (from column W) will jump in Column Z. Then Column Z will be totaled up at bottom, giving my client a total of everything selected. Can this be done and if it can HOW?!
    Thanks in Advance!!

    James,
    Another approach that may work for you would be to have a column for quantity, rather than a checkbox.  If the quantity is greater than zero, then enter the extended price and total it at the bottom of the order list.
    In that case, you would write in Z:
    =A*W
    With no quantity, the result would be zero in Z.
    Jerry

  • Sum Based on The Value of Another Group

    I'm using RS 2005 and trying to accomplish the following:
    Here is the detail data for those customers with negative balance. For example cust2 = -50 and cust3 = -30
    Cust ID    Ord #   Balance
    cust1        1          30
    cust1        2          80
    cust2        1        100
    cust2        2       -150
    cust3        1        100
    cust3        2         70
    cust3        3       -200
    cust4        1       100
    cust4        2         50
    cust5        1       250
    cust5        2         20
    Total (net) balance for cust1 is 110
    Total (net) balance for cust2 is -50 (100 + -150)
    Total (net) balance for cust3 is -30 (100 + 70 + -200)
    Total (net) balance for cust4 is 150
    Total (net) balance for cust5 is 270
    i have to aggregate the customer balance in group A (group by Cust ID)
    For group B, Division - I only want sum the  balance of the customers within that division that have a negative balance (the balance aggregate in group A).
    so the Total for Division (group B) is  -80 (bal of cust2 + bal of cust3)
    in summary, i have to aggregate the balance for each customer, base on the balance of each customer (neg bal only), i aggregate the balance for the Division.  Your help/suggestion is greatly appreciated.

    Hi Bryan,
    First, did you trying to do this at query level or at RS using grouping and expression?
    With query, to get aggregate for each customer, simply do:
    select distinct Cust_ID, TotalBalance = sum(Balance)
    from <your table>
    group by Cust_ID
    To get the aggregate for division, try:
    select Total = sum(case when TotalBalance > 0 then 0 else TotalBalance end)
    from (
    select distinct Cust_ID, TotalBalance = sum(Balance)
    from <your table>
    group by Cust_ID
    ) t1
    ** Didn't see this has been replied.

  • Conditionally Formatting One Column Based On The Value of Another Column

    I have the following requirement:
    I have 2 columns in a report showing Actual Sales & Budget Sales each year. I am using a bar chart to show the different values for these 2 columns.
    I need to conditionally format the column "Actual Sales" so that if it is less than the "Budget Sales" it will appear in red, and green if "Actual Sales" is greater than "Budget Sales." So in a nutshell,
    CASE WHEN "Actual Sales" < "Budget Sales" THEN
    RED
    ELSE
    GREEN
    END
    Thoughts anyone?

    CASE WHEN (COL1 - COL2) < 0 then Red else Green end
    regards
    John
    http://obiee101.blogspot.com

  • Update a Checkbox based on the value of another Checkbox

    We have a business rule that needs to following to happen.
    If the "Commit" checkbox is checked then the "Forecast" checkbox needs to be checked.
    We would like to handle this through workflow. Here is what we have done so far
    Workflow Rule Condition: FieldValue('<bCommit_ITAG>') = 'Y'
    Action: Field to Update - Field Name* is set to Forecast
    Value is set to: [<Forecast>]='Y'
    Thanks for the help

    Brian,
    What you have written should work, try Value is set to: <Forecast>=Yes.
    This should also be created in the Administration section as its not web services but workflows, you'll get better responses.
    cheers
    Alex

Maybe you are looking for

  • How can I transfer Photoshop from one computer to another?

    I purchased a Wacom tablet about two years ago and it came with a disc that held the drivers for the tablet and a copy of Adobe Photoshop Elements. Obviously I cant just put the CD in my new laptop and install Photoshop onto my new laptop while the p

  • Can you have the same song on 2 different albums ?

    I would like to use the same track on 2 different albums. For example, one track on the original album and the same track on my own compilation album. One way would be to make two copies of the track and call them different names. e.g. UseSomebody1.m

  • Script for Document Footnote options change before first footnote above space.

    Hi hope u r all fine, Please help for this. I want to change the space in Document footnote option. That is Minimum space before first footnote = "12 pt"; and Rule above of First Footnote in Column should be Rule off. I need script for this.

  • What is used in CRM 2007

    hi  Experts, I need some clarifications regarding the CRM2007 UI Architecture. Is Webdynpro ABAP or BSP is avilable in CRM 2007 or both avialable in 2007? What is the UI stretegy in CRM2007? what is the Architecture of CRM2007? We are planning to upg

  • ODBC Trouble

    Hi, everyone. I'm sure you've seen this type of thing before but I'm new to this and can't figure it out. Synopsis: I'm developing pages for php, have installed and configured MySQL, have installed and configured ODBC driver for MySQL, installed and