Double conditions to hide/display a field

Hello all,
I have two drop-down menus and a field. In this field, depending on what is selected in both drop-down menus, either a Yes-No choice or a drop-down menu appears.
My problem is that I don't know how to do that.
Could I run a script on the preOpen event of the field that says:
if dropdownmenu1.rawValue == 1 and dropdownmenu2.rawValue == 2
then field.YesNoChoice.presence = "visible"
field.DropDownMenu.presence = "hidden"
Would that work? Where could I get an example for that (if it exists)?
Thanks in advance

Place the code in the Exit event of both the drop downs.
JavaScript is the language.
if (dropdownmenu1.rawValue == "1" && dropdownmenu2.rawValue == "2"){
     YesNoChoice.presence = "visible";
     DropDownMenu.presence = "hidden";
Thanks
Srini

Similar Messages

  • Conditionally Hide/Display fields in a region

    How can I conditionally hide/display fields in a region. Based on a user selection whether they want to 'Enter' or 'Select', I want to dispaly the appropriate field .i.e. if the user selects 'Enter' then I want to display a Text field and if they opt for 'Select', then I want to display a Select list.
    Thanks in Advance.
    Regards,
    Hilal

    Hi Halil,
    I've been trying to reproduce what the linked site does.
    Here's my solution:
    1 - Add all items to the page whether or not they are going to be displayed
    2 - Ensure that all items that could be shown/hidden are on lines on their own (ie, set New Line to Yes)
    3 - In the region's Region Footer (or in a new HTML region in the Before Footer position), add in this bit of javascript:
    <script type="text/javascript">
    html_HideItemRow('NameOfFieldToHide');
    -- repeat for each item to be hidden when the page first loads
    </script>
    4 - On the radio button's definition, add the following in the HTML Form Element Attributes setting:
    onclick="html_ToggleItemRow('NameOfDisplayedItem');html_ToggleItemRow('NameOfHiddenItem');"
    Now when the page is loaded, one field is automatically hidden then clicking any of the radio button options will toggle the hidden/displayed fields and their labels.
    As stated before, if you do a View Source on the linked application's page, you will see either more methods that are used to show/hide items/regions, but the above should be a starting point for you.
    Regards
    Andy

  • Hide / display conditionally export links and export options

    Hi all,
    Is there a way to hide / display conditionally export links in a dashboard. Also, is there a way to limit the export options to display only Export to Excel, and not all the other options such as pdf, etc.
    Thank you
    Regards,
    Laurent

    Hi Laurent,
    Regarding limiting the choices of export, you can refer to below post:
    Re: Export to only PDF,Excel, PPT
    Thanks
    Hyder

  • Ucm: displaying some fields on a profile based on a workflow step

    Hi,
    Is it possible to hide/display some standard/custom metadata fields on a profile based on a workflow step/
    e.g. I am having a workflow with 3 steps
    1. manager step
    2. specialist step
    3. reviewer step
    On the 3 step, a reviewer can decide calling an adhoc workflow if he updates some custom metadata fields(adhoc rev1, adhoc rev2). My requirement: Is it possible to show the custom metadata fields only to reviewer on updating the content item. It should not get displayed while checkin the content item or any other step users update the content item.
    thanks

    I had a similar question some times ago - see this thread: Value of dpAction
    Yes, you can do it, but you will have to define rule activation conditions properly - using dpAction and dWfCurrentStepID.

  • Nested if-then-else with double condition

    Hi everybody, I tried to see on the forum how to build a complex if-then-else statement....but I didn't still find an answer
    So, I'll explain my situation:
    First I have to check if the field PROJ_DT_TO is null or not and then the language parameter:
    1. if the field PROJ_DT_TO IS NULL then I have to check the language parameter:
    a) if this last one is equal to 'English' I want to write inside my template 'Today',
    b) if instead is equal to 'Greek' I want to write 'Σήμερα'
    2. else if the field PROJ_DT_TO IS NOT NULL, again, I have to check the language parameter:
    a) if this last one is equal to 'English' I have to write <?format-date:PROJ_DT_TO;'MMMM yyyy'?>
    b) if instead is equal to 'Greek' I have to write <?format-date-and-calendar:PROJ_DT_FR;‘MMMM yyyy’;'GREGORIAN';'Europe/Athens'?>
    I used the following syntax...but it didn't work...
    <?choose@inlines:?>
    <?when@inlines:PROJ_DT_TO=''?>
    <?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?><?end when?>
    <?otherwise@inlines:?>
    <?xdofx:if $p_language = 'Ελληνικά' then <?format-date-and-calendar:PROJ_DT_FR;‘MMMM yyyy’;'GREGORIAN';'Europe/Athens'?> else if $p_language = 'Αγγλικά' then <?format-date:PROJ_DT_TO;'MMMM yyyy'?> end if?>
    <?end otherwise?>
    <?end choose?>
    The first piece, until the first <?end when?> instruction works....it's the <?otherwise@inlines:?> and the rest which doesn't work.....
    If, instead, I use (without reaching my goal):
    <?choose@inlines:?>
    <?when@inlines:PROJ_DT_TO=''?><?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?><?end when?>
    <?otherwise@inlines:?>
    <?format-date:PROJ_DT_TO;'MMMM yyyy'?><?end otherwise?>
    <?end choose?>
    I see the date PROJ_DT_TO even if always in the date format 'MMMM yyyy'
    Anybody knows how can I rewrite my statement in order to reach the if-then-else situation I metioned above ?
    Thanks in advance
    Best Regards
    Alex

    Hi Vetsrini, thaks for your answer and your hint !!
    I tried your code, but without the command 'when@inlines' doesn't work...
    So I tried this :
    <?choose@inlines:?>
    <?when@inlines:PROJ_DT_TO=''?>
    <?xdofx:if $p_language = 'Ελληνικά' then 'Σήμερα' else if $p_language = 'Αγγλικά' then 'Today' end if?>
    <?end when?>
    <?otherwise@inlines:?>
    <?format-date:PROJ_DT_TO;'MMMM yyyy'?>
    <?end otherwise?>
    <?end choose?>
    and It works..
    But, look at this ! I discovered on the manual that inside the Preferences it's possible to set the Report Locale with the language you want.....and if I set my Report Locale in Greek, using the code above I correctly see all dates in Greek....but ALWAYS !!
    I need to see dates in Greek or English dinamically according to the value of the parameter p_language passed inside the template at the beginnig (<?param@begin:p_language?>).
    Even if inside the code there is the double condition ($planguage = 'Ελληνικά' or $p_language = 'Αγγλικά') for the two cases PROJ_DT_TO='' or PROJ_DT_TO !='', I see ALWAYS dates in the language set inside the Locale Report....
    Is there a way to manipulate the Report Locale Setting and make it dinamic ?
    Thanks in advance
    Alex
    So this preference is static, even if inside my report I have the parameter p_language I can see the data and headings with

  • A condition to avoid displaying a product with the same Product Name in a report

    hello,
     Is there a condition to avoid displaying contents of two similar product names in a subreport?
     here is the scenario:
    Need to display Parent information in a separate List - Good
    child Product information in Sub-report,
    I'm passing both ProductID and ParentName parameters into Sub-Report to display the contents of the sub-report. If there are no similar Parent name, the sub-report works fine. But if there are similar ParentName, my sub-report
    starts listing all Products from the parent name.
      example
        Parent Product 1 ->  
                        Sulphate
                        Product_ID -> xx345
                        child Product1 ->  SulPhur (details...)  in a SubReport
      Parent Product 2 ->
                       Sulphate
                          Product_ID -> xx3342
                          Child Product1 -> Sulphuric Acid (details...) in  a SubReport

    Hi xitum,
    Per my understanding that both the subreport and the main report contains the field "ProductID" and "ProductName", and some of the ProductID will map the same ProductName which will display some duplicate subreport in the list like below,
    right?
    I have used some sample data as below and you can see when the different ProductID have the same values of "ProductName" and "Amount" and some other field value, it will display all the duplicate information
    in the subreport when add the main report in a list:
    ProductID   ProductName  Amount:
        1               ZXITest         220
        2               ZXITest         220
        3               ZXITest2       100
        4               ZXITest3       200
    If this is the case, please reference to the similar case in below thread which include details steps about how to do the deduplicate:
    how to avoid duplicate displaying a chart in a list
    If I have some misunderstanding, please try to provide some snapshot of the unexpect result you have got and more details information about the expect result you want.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • How to hide dynamic selection fields in variants

    hi,
    When a selection variant is saved, we have the option to 'hide' a selection field. That field may contain a value, but it is not shown on the selection screen. There is, however, a button that will display these hidden field when required.
    Is it possible to do this also with dynamic selection fields ?
    The column 'Hide field' is shown in the variant atttributes screen, but it is not active.
    Please suggest
    MS

    Explore SHD0 T code

  • ESS portal: Hide additional info field in release working time screen

    Hi,
    I need to know how can i hide 'additional info' field in the release working time screen?
    I know i would use personalization but don't know the way to do that.

    it will be shown in header only in release application, let me explain
    In the time recording application, when you enter a record and click
    on review, the additional info columns shows the text. This works
    because the data is entered by the user and the entered record is
    mapped to additional info column.
    In time release application, all the records from database are retrieved
    and displayed. The user does not enter any data. Hence in this case it
    is not possible to map the records to text in the additional info
    column. The Error/Warning messages are displayed in the top of the list
    with detailed information. We feel the information displayed is
    sufficient for the user to take necessary action. Usually in the release
    application, there would be lots of records. Displaying text in both
    additional info column and also at the top of the list is not a feasible
    solution.
    Technically it would be difficult for us to change this behavior in the
    standard application.
    we have new application in EHP5.
    Edited by: Siddharth Rajora on Mar 9, 2012 7:10 PM

  • How to hide a mandatory field in sap standard webdynpro via Enhancement

    Hi,
    I know to hide a column or UI via enhancement. But if we hide a field via this approach which requires an input we will still get an error message to make an entry.
    I am trying to make changes in travel management e.g in FITE_VC_REVIEW webdynpro component. In REVIEW_VIEW in Flight Info table I want to hide columns like arrival time, arrival date. However in current scenario these fields are required to be filled in. If left blank we get an error message while saving or sending request.
    Kindly guide me where and how to make changes to remove these column fields.
    Regards,
    Madhvika

    You can remove the UI elements from teh design itself by right clicking on it and slecting remove element.
    but still the condition for checking the mandatory field swill be there in the code so for that you need
    to write teh code to set some values to those attribute for passing the condition for validation
    thanks
    sarbjeet singh

  • Hide Industry Sector Field after giving it a defalut value

    Hi!!
    I want to hide industry secor field in material master initial screen . Also as industry sector is a mandatory field i want the system to take a default value all the time without ever displaying it .
    Pls tell me the settings .
    Regards ,
    Anis

    Hi,
    You can do the same by following setting :
    Go to MM02-> Defaults ( Menu) -> INdustry Sector--> Select Required Industry sector and then tick the Check box HIde Industry sector on initial screen and then continue.So always this industry sector by default will be selected and also will be stayed hidden.
    Hope this helps.
    Revert if any doubt.
    Regards,
    Tejas

  • Hide a output field in FM

    Hi Guys,
    I have one structure with 12 fieds.
    in 1 FM i need display all 12 fieds,
    but in another FM i need to hide 3 field in the above 12 field.
      How can i hide a output field in a function module??
    Thanks,Shaik

    HI,
      You cannot hide the field .. what you can do is create a new structure with 9 fields that you want to display.. and use this structure in the FM rather than the one that you are using..
    No hide option available
    Thanks
    mahesh

  • Hide a standard field

    Hello all,
    I need to know: is there a way to hide a field in SRM web portal? For example, I know, in SAP ECC there is 'Field Status'; in SAP SRM.
    Thanks,
    Best Regards,
    Maria

    Hi,
    As I told you the BADI "BBP_UI_CONTROL_BADI" can be used only in some trasnsactions to hide the std fields/links etc.
    Pls read the documentation of the BADi:
    Field Control in Purchasing Document
    Use
    Using the Business Add-In BBP_UI_CONTROL_BADI, you can change the visibility and the ready-to-input status of interface objects (for example, fields and pushbuttons) in a document.
    You can use the BAdI to override the following documents and applications:
    Purchase contract and global outline agreement
    (Filter value BUS2000113)
    Bid invitation (Filter value BUS2200)
    Bid (Filterwert BUS2202)
    Auction (Filter value BUS2208)
    Purchase order (Filter value BUS2201)
    Purchaser's Sourcing application
    Confirmation (Filter value BUS2203)
    Invoice (Filter value BUS2205)
    Vendor list
    Note
    Changing the ready-to-input status of fields as designated in the standard can lead to errors. You should, therefore, avoid switching the status of a field that is not ready-to-input in the standard to ready-to-input. Do not, for example, set the object ID of an already existing contract to changeable.
    Standard settings
    Using the following methods of the BAdI, you can control the visibility and ready-to-input status of header and item fields, pushbuttons, and navigation links of the concerned applications and also interface objects of cross-application screens, for example, the partner overview, account assignment, status overview or approval:
    BBP_CTR_UI_CTRL
    for field control in the contract and in the global outline agreement
    BBP_BID_UI_CTRL
    for field control in the bid invitation
    BBP_QUOT_UI_CTRL
    for field control in the bid
    BBP_AUC_UI_CTRL
    for field control in the auction
    BBP_PO_UI_CTRL
    for field control in purchase orders, including the screens for purchase order response and price data in the item details.
    BBP_AVL_UI_CTRL
    for field control in the vendor list.
    Using the following methods, you can override the visibility and ready-to-input status of header and item fields, pushbuttons, and navigation links of the relevant application, however not that of interface objects of cross-application screens:
    BBP_SOCO_UI_CTRL
    for field control in the purchaser's Sourcing application
    BBP_CONF_UI_CTRL
    for field control in the confirmation
    BBP_INV_UI_CTRL
    for field control in the invoice
    Using the following method, you can set up the mass change transaction in such a way that the previous step need not be completed before the user switches to the next screen.
    BBP_CTR_MASS_UI_CTRL
    for control of the mass change transaction.
    Other then the transactions mentioned above,you need to modify the Std ITS templates(in tcode SE80) to hide the required  fields/buttons.For this you first need to find the corresponding ITS service  and HTML template for the screen in which you want to remove the button/links from.
    E.g.,This is the sample code for Bid invitation screen fields:
    *To make the TYPE OF PUBLICATION field under BASIC DATA tab in BI screen as display only
    IF iv_fieldname = 'BBPS_BID_UI_HEADER-BID_TYPE'.
    cv_input_ready = c_space.
    ENDIF.
    HTH.
    Similarly,You can debug at runtime and see the structures and names for the fields/buttons as per the CATALOGUE  screen.
    BR,
    Disha.
    P.S.  DO  reward points for useful answers.

  • Can a display image field be changed with javascript

    I have a select list (P3_RECON_CONDITION). when it changes It triggers javascript..
    in that javascript I would like it to change a Display Image field (P3_RECON_COLOR) without having to refresh the whole page..
    P3_RECON_COLOR is a Display image filed that gets its image from a blob from SQL:
    select color from projstat.condition_color, projstat.project where condition_color.condition = nvl(:P3_RECON_CONDITION,'W') and project.job_piece = :P3_JOB_PIECE
    the display field works now, but only for what the P3_RECON_CONDITION is when the page is loaded..

    yes, I tried that, but couldn't figure out how to do the: " dynamic action refresh the item P3_RECON_COLOR"
    I have
    Event: Change
    Selection Type: Item
    Item: P3_RECON_CONDITION (the select list)
    no condition
    TRUE ACTION: Refresh
    Fire when True:
    Selection Type: Item
    Item: P3_RECON_COLOR (the display image)
    (if I change the action to submit page.. it does fire.. but the refresh item does nothing..)

  • Crosstab: How to define margin size and hide a resuming field

    Post Author: jef.zapata
    CA Forum: Charts and Graphs
    Hi,I've work a lot on how I can optimize space between my fields in crosstable, and now I want to decrease margin size (removing margin totally make the display of my field horrible!). How can I do that?Secondly, I want to use a resuming field to define the sorting of my group field. This kind of sorting is working very well, but I want to hide the resuming field, not only supress the value, but totally hiding the field without loosing space, because I've got another resuming field that I want to display. Is it possible?Thanks a lot! Jef----
    Using Crystal Report XI, on Release 2  

    Hi Suman,
                  if your problem is to avoid null pointer exception for EVS, before executing  RFC you can check (wdContext.node<EVS>.current<EVS>element!=null). then you can populate a message for warning the user to enter EVS field.
    and stop executing RFC.
    thanks
    Siva

  • Hide/display charactersitics in ISA Webshop applications

    Hi All,
    I am new to CRM development and I am trying to understand the CRM-ISA applications.
    I am stuck up at a place where, I have to display a specific characteristic of a selected product.
    Used the "showmodulename" parameter to get the required jsp file , and I have extracted the standard code and had a look at the characteristic.jsp file.
    I would like to know if this feature(hide/display) is done in backend as part VC configuration or can i manually hardcode the property of a field to  hide/display ?
    Need you inputs on this.
    Thanks,
    Aman

    Hello A S,
    I have to display a specific characteristic of a selected product
    What you (or your VC design time consultant) do in R/3 design time is what you see during the runtime in ISA (via IPC).
    If a characteristic C1 is displayed in a Characteristic Group (tab) CT1 in R/3, you will have the same visual effect in ISA. The JSP you saw displays the characteristic names and values dynamically as it found from the design time (a.k.a KB in CRM). In effect, the IPC UI painstakingly mirrors the R/3 runtime behavior. So, you have to see if this hide and seek is acceptable in R/3 runtime.
    Alternatively, if you want to hardcode the behavior of some characteristics in ISA alone, nothing stops you from coding inside the loop in these pages. But you must hardcode the characteristic name in your code and change the behavior. For different types of data (text, number, list) need different types of treatment.
    Remember, if you have multiple configurable products (KBs) with different design time and runtime behavior and if the characteristic names are different in different KBs, then you have to be careful. Also, whenever the KB changes, you have to check if your JSPs that contain the characteristic names require any new tinkering.
    Easwar Ram
    http://www.parxlns.com

Maybe you are looking for

  • Small logic in ABAP

    Hi,      am very new to abap , i have the logic of Prime number in c language , i want to do it in ABAP , so kindly help me . thanks, Sudhakar

  • Using 8800 as bluetooth modem

    Is there a way to use the 8800 as a bluetooth modem? I have not problem using it when connected by USB. Shuki 

  • JWS - Printing & File IO Security Preferences

    After the user has initially said that this is okay and selected "please don't warn me again", does anyone know how to save these settings between program invocations? It is a real pain for the user to keep having to say yes to this every time they r

  • Launchpad icon restore

    I drag an Icon from Launchpad to dock, accidentally it is missing in Launchpad since then. How can I get it available in Launchpad again? Thank`s Leif

  • Can i know email or name of Owner with IMEI ?

    Hello , i bought Iphone 4 but it is bloqued icloud , i don't know the person who sell me the device can i know his name or his adress using serial number or the IMEI of this device ! i want contact him to set the Locate my IPhone Off . please help me