Hide/show a textfield depending on the value of two different textfield.

Hello
I have two textfield i.e grade_code and travel_policy
.
.
.
.
now, let me explain what these field...
grade_code is like E4, M4, M1 etc WHERE field
travel_policy's field as AIRWAYS, RAIL - 1AC, RAIL - 2AC mode i.e transport etc.
now...
.
.
.
as a person of rank E4 is allowed to travel ONLY in RAIL - 2AC, IF GRADE E4 TYPE PERSON trip in Airways.then, give reason for...
.
.
.
what I demanded, it is according to textfield grade_code and travel_policy, an another REASON textfield must be hidden and shown dynamically
.
.
.
.
RANK - The RIGHT OF TRAVEL of MODE
M4 - AIR, RAIL - 1 AC.
M3 - AIR, RAIL - 1 AC.
E4 - RAIL - 2 AC.

.
.

Published by: Richard on January 31, 2012 09:19

I still think a function that returns a Boolean is the way to do it.

Simple solution is to list all possible combinations. A better choice is to know if there are more combinations 'show' or "not displayed" those, so you would appoint those who require less typing while others would be 'other '.

Here is an example:

if :P1_GRADE_CODE = 'E4' and :P1_TRAVEL_POLICY = 'AIRWAYS' then
   return (true);
elsif :P1_GRADE_CODE = 'M4' and :P1_TRAVEL_POLICY = 'AIRWAYS' then
   return (true);
elsif :P1_GRADE_CODE = 'M1' and :P1_TRAVEL_POLICY = 'AIRWAYS' then
   return (true);
else
   return (false);
end if;

Even the best option would be to create a table between GRADE_CODE and TRAVEL_POLICY values, which would contain the valid combinations. Then, you would just to check if the entered values exist in this table and return (true) or (false).

Tags: Database

Similar Questions

  • Toggle button depends on the value of the selected row

    Hello.

    My problem is:

    I have a Table "singleSelect" and a button Delete.

    I´d want to toggle the button depends on the value of the selected row.

    I mean:

    C1: DepartmentId
    C2: Yes/No

    For each line: If c2 = "" then disable the rest button activates the button.

    I hope you can help me.

    I'm from Venezuela my English is not very good. :)

    Disabled = "#{row." C2 eq 'No'} '.

  • How to enable and disable a button depending on the value of a field

    Hello experts,

    I enable and disable a button depending on the value of a field.

    I did the following:

    in a trigger of on_new_form_instrance I put the following
    begin
         
    go_block('OE_HEADER');
    execute_query;
    IF :oe_header.status = 'BOOKED' THEN        
          SET_ITEM_PROPERTY('CONTROL.ACTION',ENABLED,PROPERTY_FALSE);
    else
         SET_ITEM_PROPERTY('CONTROL.ACTION',ENABLED,PROPERTY_TRUE);
    end if;
    
    
    end;
    the problem is that it works but does not change when my header_status value is changed.

    You have to put the same code in when-validate-item trigger of: oe_header.status...

    and I think that this code should be trigger after query

    IF: oe_header.status = 'RESERVED' THEN
    SET_ITEM_PROPERTY('CONTROL.) ACTION', ENABLED, PROPERTY_FALSE);
    on the other
    SET_ITEM_PROPERTY('CONTROL.) ACTION', ENABLED, PROPERTY_TRUE);
    end if;

  • get the value of two fields in a field

    Hellou,

    I need some new help with javascript

    Currently I use the below code to get the value of one field to another:

    getField("Text35").value = getField("Text1").valueAsString;

    Now, I wonder how to change this code, so I could get the values of two fields in one. I for example field 'Name' and 'name' field, now I want to show in the field 'name '.

    Example, if the firstname field have John value and the value of the lastname field is Doe, I want to show in the field name as "John Doe".

    I hope that u understand what I want

    Thank you for helping me!

    getField("Text35").value = getField("Text1").valueAsString + "" +.

    getField("Text2").valueAsString;

  • Starting from two data tables, how do you get the values in two columns using values in a column (values get col. If col. A is not null values and get the pass. B if col. A is null)?

    Two tables provided, how you retrieve the values in two columns using values in a column (the pass get values. If col. A is not null values and get the pass. B if col. A is null)?

    Guessing

    Select nvl (x.col_a, y.col_b) the_column

    from table_1 x,.

    table_2 y

    where x.pk = y.pk

    Concerning

    Etbin

  • What happens if I am connected to the internet through two different sources or more?

    What happens if I am connected to the internet through two different sources or more?

    You get Internet from two sources. What did you expect to happen?

    This is not double the speed of anything...

  • Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different with different

    Hello. Editor of newbie here. If I split a video file into two clips in Premiere Pro and you want then save each one as a different file while exporting to the encoder, how to make sure that they are registered in the form of two different files with different after encoding names?

    Located in and out on a section and that export brands.

    .. .Rinse and repeat for the other section.

    Name each section and where it is exported to separately... and as you wish

  • How to track the message to two different queue using jms proxy service

    Hi all
    In my project, I need to listen to a jms queue, then forward the messages to the queue of two different.
    Now, I already have a proxy for listening to the queue and then pass it to another queue using business service, it works.
    But how to forward messages to two different queues in the same workflow process using a proxy and bs?

    or in any other way?

    Really thanks in advance.

    Kind regards

    Kahlil

    You can use actions to publish in the pipeline to achieve this.

  • view the code for two different pages at a time

    HI - in other editors I've used I've always been able to implement the code for two different pages so that I can watch side by side to compare. I can't find a way to do this in Dreamweaver. Anyone know if this is possible?
    Thank you

    Found. Always after asking for help! This is the "cascade" in the Windows menu.
    Thanks anyway!

  • Turn off/on a tabular Form attribute depending on the value selected in another attribute

    Dear Experts,

    I have

    1. an attribute in the form that is a select statement list containing 2 static values:

      • Family
      • Only

    and I have

    2 another attribute of tabular presentation that is display text (escape special characters, does not save the State), this attribute is also a link to another page.

    My requirement is when I select the family of another select list this attribute must be enabled and when I select one it should be disabled.

    Kindly help out me experts!

    Thank you and best regards,

    Madonna

    Hey Madonna,

    Please take a look at your page. I added a dynamic action that can be triggered by a change in the Type 'accompany' - selection list. dynamic action to display or hide the link 'Add family' according to the value of the selection list. the code of the dynamic action is as follows:

    $('.myClass').each (function () {}

    If ($(this).) Val() == 'Family') {}

    $(this) .parent () .parent ().find('.open_modal').show)

    } else {}

    $(this) .parent () .parent ().find('.open_modal').hide)

    }

    })

    where 'myClass' is the class that gave you to the selection list, and the "open_modal" is the class that gave you for the link.

    I used a show and hide because you cannot disable a link.

    I would like to know if that's what you had in mind.

    Kind regards

    Vincent

  • How to hide a menu if one of the values of it was selected but not others?

    Thanks looking for this forum, I was able to understand how to hide pull down and fields who have no digital information in them. IE, if the user selects. or if the conversion value is zero. The element show or print on the form.  What I can't find, it's how you do it if the values in the pulldowns are text? That is the drop down menu has three options "choose an item", "ITEM 1", "ITEM 2". It is default to "choose an article" and this way, I want to be hidden or the value null, but if the POINT 1 or 2 are selected. Then it shows/prints POINT 1 or 2 POINT in place.

    Thank you for your help on this issue.

    I thought about it

    and must give congratulations to George Johnson because of an answer he gave in 2008 told me the solution.

    http://forums.Adobe.com/message/1152008

    First of all, I assigned a calculated value for each of the text elements.

    So here is my script.

    Get the value of the field

    var v1 = + getField("Description1").value;

    If the value is not equal to 0, then use the value

    If (v1! == 0) {}

    Event.Value = v1;

    } else {}

    If the value is equal 0 empty then the value

    Event.Value = "";

    }

    Post edited by: AXNUCorp, due to a funky and paste

  • Editing a text depending on the value of another field to text field

    Hi guys,.

    I am facing problem with the update of a field of dependent text in another text field.

    I have 2 text fields. Both are date format. In the 1st text field enter a date, and in the following text field I need the value in the form date_in_previous_text + 30 days.

    I used a query at the time to validate the point but it does not work. It is as follows.

    If: txt_field1 is not null then

    : txt_field2: =: txt_field1 + 30;

    end if;

    Please help me with the same.

    Hello

    u has not clarify what the problem, u just said the scenario but without any anomaly. Try to use the KEY-NEXT-ITEM trigger on the second level of the item.

    Or POST-TEXT-ELEMENT trigger of the 2nd element.

    Amatu Allah.

  • How to hide/show a field based on the data from more than 1 field?

    Hello.

    I'm trying to hide/show a based on the data of field2 and field3, Field1

    in fact using dynamic measurements I can only hide/show Field1 Field2-based, but I need a combination, for example:

    If field1 = 'A' and field2 = 'B', then see the field3, other hide field3

    y at - it an easy way to do it.

    I use Application Express 4.2.4.00.08

    Thanks in advance

    Dynamic action

    On the changes

    jQuery selector: #P1_ITEM_1, #P1_ITEM_2

    Condition: JavaScript

    $v ('P1_ITEM_1') == 'A' & $v ('P1_ITEM_2') == 'B '.

    Real Action: show item 3

    Action of false: hide item 3

  • How to put the two column values in two different colors unique online: MobApp

    Hello

    I develop Mobile Application.
    I want to show two values in different columns in single row and first column value in either green or red and the second color the default column value.
    the first value of the column is green when the value is greater than the second value of the column.
    and the first column value in red when the value is less than the second value of the column.
    The code I tried is:
    --------------------------------------------------------------------------------------------
    < tr:panelGroupLayout layout = "vertical" styleClass = 'list' >
    < tr:panelList styleClass = "panelist ul > li > a" >


    "" < tr:outputText value = "deliver: % #{row.bindings.OccCurr.inputValue},
    inlineStyle = "background-color: #{rank." OccCurr > line. OccFcst? {'Green': 'Red'}; ">

    "< tr:outputText value =" OccFcst: #{row.bindings.OccFcst.inputValue} % ">"

    < / tr:outputText >
    < / tr:outputText >
    < / tr:panelList >
    < / tr:panelGroupLayout >
    ------------------------------------------------------------------------------------------------

    But the code above does not work.


    Please, someone tell me what I need to do.


    I apreciate your time and your help.

    Sanchez.

    Hi Catherine,

    Exactly, what is not working? Your OccCurr and OccFcst values are printed to the screen? I notice some questions.

    (1) If you want to display two outputText on one line, you can surround them with a panelGroupLayout and set the page layout to horizontal.
    (2) I don't think that you can place an outputText in outputText one another as in the codes that you have provided.
    (3) your EL is inconsistent. What is #{row.bindings.OccCurr.inputValue} or #{line. OccCurr}? If your values are displayed, but the background color does not work, it could be the first.

    
      
        
          
          
        
      
    
    

    Kind regards
    Amélie Chan

  • How to use the values acquired by different treatments with 9188 OR cDAQ

    Hi guys, I'm trying to use NI DAQ 9188 chasis with temperature measurement module 9214. I plugged in 3 modules to the module and split signals. But I'm not sure that I can easily these values in functions. I'm trying to convert them into table 1 d, but when I converted the table 1 d I can't see the values and use separately from each other. For example, I simply multiply the first value of 1 thermocouple. How could I do that. In addition, the signals in the waveform table 1 is not smooth. What is the reason for this? Thanks in advance.

    Hi James-D,

    Thank you. Now, it is clear to me.

Maybe you are looking for