Show or hide form fields based on Department

Hello world

I have a large form with many fields on. I have a requirement to show/hide some of these fields, based on the Department of the user code. So a user of a particular Department would see a set of fields over only those relevant to their Department - all non-relevant fields for this Department need to be obscured.

My first thought was to define the conditional on each field and allows you to search if the field to be displayed by checking a department-field table in the SQL database. But it would mean a blow to the database for each field, that I need to check.

Can anyone think of a more elegant (and efficient) solution for this? I use Apex 4.2.

Hello

Permission to create and assign to the patterns.

Permission is normally performed only once per session.

Kind regards

Jari

Tags: Database

Similar Questions

  • Show or hide form fields based on the selection of cfselect

    Hello

    I use ColdFusion 9 and

    I want to show/hide a form field type = checkbox if an assigned value is selected from a drop-down list, but it does not work.

    I use a javascript function.

    My question is: is there the best opportunities with ColdFusion for this or Javascript is the best solution?

    Here is my code:

    < script type = "text/javascript" >

    function show() {}

    Select var = document.getElementById('dropdownlist').selectedIndex;

    if(Select == 1) document.getElementById('area').style.display = 'block ';

    else document.getElementById('area').style.display = "none";

    }

    < /script >

    ....

    < cfquery name = "select_list" >

    Select * from table

    < / cfquery >

    < cfform name = 'form' >

    < name = 'dropdownlist' cfselect onChange = "show (); ">

    < option value = "0" > please select < / option >

    < cfloop query = "select_select_list" >

    < option value = "#select_select_list.id #" > #select_list.name # < / option >

    < / cfloop >

    < / cfselect >

    < div id = 'space' style = "display: none" >

    < cfloop query = "select_list" >

    < style tr = "display: none" >

    < td >

    < name cfinput = "SSG" type = "checkbox" value = "#select_list.id #" > #select_list.name #.

    < table >

    < /tr >

    < / cfloop >

    < / div >

    < / cfform >

    Thank you and best regards!

    Claudia

    Well, thank you for your response.

    I changed the javascript function and replaced the

    with thetag. Then it works.

    Here is a snippet of my code:

    Select * from table

  • show or hide text fields based on another text field value

    Hi, I have 3 text fields totals. by default, first text field is visible & other hidden two. what I want to do is if enter all the values in the first text box, other two text fields should automatically visible. Likewise, if I remove the value in the first text box, and then two other fields should automatically hide again. so thanks for giving me a java script for that. also I need javascript for hidden text fields. This script should check the values in the first field work and text (visible or hide). Thanks in advance...

    As the custom field the validation script enter this code (of course, set the names of the other fields as required):

    if (event.value=="") {
        this.getField("Field2").display = display.hidden;
        this.getField("Field3").display = display.hidden;
    } else {
        this.getField("Field2").display = display.visible;
        this.getField("Field3").display = display.visible;
    }
    
  • How to calculate the sum of two digital form fields based on the selection of the checkbox.

    I have a form in Acrobat Pro who needs a custom calculation. How to calculate the sum of two digital form fields based on a selection of the checkbox. I have three number fields. Field-A and B are simple one or two digits. Field-C is the sum, or the total field. I want to field-C have a control box which, when turned on and off, just gives a. gives the sum of A + B

    _ Field - 2

    _ Field - A 4

    [check] _ _ field - 6 C

    [disabled] _ _ field - 2 C

    Thank you

    The custom field C calculation script could be:

    (function () {
    
        // Get the values of the text fields, as numbers
        var v1 = +getField("A").value;
        var v2 = +getField("B").value;
    
        // Set this field's value based on the state of the check box named "CB"
        if (getField("CB").value !== "Off") {
            event.value = v1 + v2;
        } else {
            event.value = v1;
        }
    
    })();
    

    Replace 'A', 'B', and 'CB' with the real names of the fields.

  • ? Selections of list box to show/hide form fields

    OK, so I want to use a list box to control the fields on form on my page are visible or hidden. I have no problem creating the list and adding items to the list, but were not able to understand what I need to connect each selection in the relevant script form field I want that he controls.

    So, basically, I want to know what javascript is required in order to allow the end user to select one or more items of the listbox and have these fields become visible on the page. How can I do this?

    Had a look at your code and you complete the loop before running your tests. If moldy either inside the loop for. statements I have modified your code (reformatted into it a bit so it is easier to read) and it included here.

    Paul

  • Acrobat - 'Plus' sign showing on some form fields and others don't

    Hello

    We have built a PDF for a customer who has a number of form fields. Some are same line but most are multiline fields. Everything works well except that on some areas, views "overflow indicator text' and on the other is not.

    We cannot predict the length of the text (it will take overflow on most fields) so they need to be a fixed height. It looks like Acrobat is struggling to understand what fields have 'overflow' text and then sometimes displays the indicator and sometimes is not even if the fields themselves are identical. I know that we can stop the indicator to display in our individual preferences, but this wont be any good for the recipients that we cannot say to each user for that turn on or off.

    Any guidance appreciated! Is there a way to disable this flag for end users?

    Since you use Acrobat, you are more likely to get a useful response if you ask in the forum of Acrobat.

  • Show/hide form fields

    Thanks in advance for your help. I work with a form that contains calculated fields. The calculated field is formatted for currency, so it contains the "$0.00" in the field automatically. Customers can also print the form and fill it out by hand, so the "$0.00" is a nuisance. Is it possible that I can hide the calculated field, unless the user has actually enters data fields to be calculated? Any advice would be appreciated. Thank you.

    The United States of the monetary symbol does not authorize the removal of the display of zero with a string NULL. So you can either set the fields do not use the currency symbol or dynamically change field with JavaScript format.

    For the validation script, use the following code:

    validation code custom;

    var cCurrency = ""; Disable the currency symbol;

    If (event.value! = 0) {}

    Event.Value = event.value;

    currency symbol set at USD

    cCurrency = ' $';

    } else {}

    value zero set value of field to null

    Event.Value = "";

    }

    Set the format with or without currency symbol field.

    AFNumber_Format (2, 0, 0, "", cCurrency, true);

    Code of end of validation custom;

    The number of decimal places is supposed to be 2.

    The form will need to be cleared or perform a calculation for calculated fields will be updated and the validation script will be executed before we see the results of this change.

  • Hide the form field based on the name that contains some characters

    I think it's easy.

    We're looking for help with a script that allows you to hide all instances of text fields that contain a certain value. We have a running feature that applies to the same text fields, however, each text field should be labeled with a number at the end also running with this is a custom save button that flattens the page and hides some elements before the record on. The hide feature works pretty simple with "this.getField... = display.hidden; The problem is we do not want to repeat this step for each unique instance of fields that share the same name.

    We must look to each text box that has a similar title, so for example if we had several fields like that...  "my-text-field-01", "my-text-field-02" and "my-text-field-03" we want the script to find the "my-text field" name and hide all instances of that. ' "."

    Hope this makes sense, I'm sorry, our programming skills are still amateur. Thanks in advance for any help.

    You can do if you use a hierarchical naming convention. For example, instead of using something like: my-text - field.1, my-text - field.2, etc..

    You can then hide as well as:

    // Hide all of the "my-text-field" fields
    getField("my-text-field").display = display.hidden;
    
  • Show and hide some fields against a number

    I have a form for number of dependants and their insertion of names. A user can insert maximum 5 number of dependents, so total I have 6 fields, for the insertion of several dependends and 5 others to insert their names,

    I want to hide all five fields of dependents in the form, and if the user makes any number less then 6 then filleds should be visible depending on the number the user will be in put.

    I tried but I get no success, I used a dynamic insertion for if the user enters 2 or 3, but it does not work. I used two action individually for 2 and 3. but without success.

    Need advice on this.


    Thanks in advance

    Concerning

    Mazahir Abbas

    Hello

    You can show/hide elements based on the value entered in a number of ways.

    Here is an example: http://apex.oracle.com/pls/otn/f?p=12983:9

    Who uses dynamic Actions. That the user changes the value of 'Count', individual text fields are shown/hidden depending on the value selection. In this example, there are five dynamic Actions on the page - one for each of the possible values and related items.

    Each action has the following parameters:

    Event: change
    Selection type: item (s)
    Article (s): P9_COUNT (which is the selection list)
    Condition: greater than or equal to
    Value: * 1 * (for the first article of dynamic Action, then 2, 3, 4 and 5 for the other)

    Real Action: show
    Fire on the page loading: true
    Selection type: item (s)
    Article (s): P9_ITEM1 (for the first point of dynamic Action, P9_ITEM2 etc for the others)

    Action of false: hide

    Fire on the page loading: true
    Selection type: item (s)
    Article (s): P9_ITEM1 (for the first point of dynamic Action, P9_ITEM2 etc for the others)

    When a Count is selected, all dynamic Actions will trigger - each will control the display of the text elements. If the selection is 3, the first three dynamic Actions will show the first three text elements and the last two actions allows you to hide the text elements.

    Andy

  • Is it possible to hide form fields that have been chosen not at all in a confirmation of the web form page?

    I have a form of mutli-step complex, in which visitors build their own party. There are several option "Add-ons" that can be selected by entering a number in the entry, depending on how much the visitor wants. Would be nice NOT to fields if the visitor does not enter a number. Any thoughts? The page (in production) is linked below.

    parts

    Hey,.

    You can hide the «extra"fields in a first time.» Then, using javascript assign an entry (https://api.jquery.com/keyup/), so whenever keyup event that users focus at the entrance and enters a value you check if the number is greater or under the visitor counter, you need. Then, if it is to show the hidden fields.

    Hope this helps,

    Mihai

  • How to hide a field based on the value of a field of a different subform - controls null does not work!

    I use Javascript to define actions. I need to hide a text field, if the value of a field in another subsidiary form is zero.

    -J' tried to check the value in the other field NULL - does not work

    -J' tried affecting a variable str2 where I know that the value in the other field is available, then checking this variable when I initialize the text field - does not work

    What Miss me?

    Hello.

    Try this in the form of native void, referring to the text field (X).

    If (this.rawValue = 1)

    {

    X.Presence = "visible";

    }

    ElseIf (this.rawValue = null)

    {

    X.Presence = 'hidden ';

    }

  • How can I show or hide a picture based on the size of the screen in CS6?

    I have a website created using Dreamweaver CS6. I used the checkerboard to fluid to hold different views for each of the 3 types - phone, Tablet, desktop computer. It works well, resizes properly. I would like to be able to show a picture in the desktop version but not the mobile version. How I do that? I can see in the .css file that the screens of different size can have their own different settings. Y at - it code I could add that could hide/show and image based on the users on the same page window? Let's say I have a div that is named photo. How could I add a parameter to the div photo in the stylesheet that would hide the image if it were mobile?

    Thank you

    Marilyn

    Thanks, I was able to change my code using your example and it works exactly as I wanted!

  • Primavera P6 R 7 - need help on hide a field based on the role

    I'm on P6R7 Primavera and to hide a gift of basic field rile to a level of activity.

    is this possible?

    You can not put the text. You can have a Code resource field and make them all Secure, but you need to come up with answers possible HR you want to join.

  • Auto-fill form fields based on the input from the end user?

    I am currently trying to create a new form that has a combo box 'Locations' with various options.  What I want to do, is to have another car to text field to fill out other fields associated with this location (for example, address, contact information) to save on time and reduce the possibility for the end user input errors.

    What are my options to accomplish such a task?  A form of bonding in the fields with a database of MS maybe?

    Thanks in advance for all advice and assistance on this subject!

    I created a sample for you... are a look and let me know if this is the case for you.

    Paul

  • Update form field based on the evolution of the Organization

    Hello Forum!

    This is my first post, as I'm new to IOM, I'll try to explain the problem as specific as possible.

    The situation:

    We have some sso devices, each of them associated with an organization with a search, so when you create a user, based on the name of the Organization, a predefined resource is associated with the identity. For this, we use an adapter pre-populate the form of resources.
    The problem arises when we move from a user to other agencies, I can't get this update automatically value.
    I capture the event of organizational change using the process task 'User to move' with a dummy adapter that returns true and calls the "Update SSOAPPLIANCE" task that downloads the device identification information.
    All tasks are running, but the form process remains the same.

    Is it what can I do to make this process of automatic update?

    Thanks in advance.

    Xisco Fernández.

    Hello

    I'm not sure, but if your type of variable is this resource, then you can set it as a String.OIM will convert him at length internally. If this isn't the case, then Yes you must get the key of the resource COMPUTER in the name of the resource and then update in the form of process.

    Let me know if you have any other questions.

    Concerning
    Nitesh

Maybe you are looking for

  • Errors in scripts on stimulus

    33.1 FirefoxWhenever I raise the Firefox, I get several errors in scripts. By clicking on the buttons does nothing. I always force Firefox to quit at least once for things to calm down. At the suggestion of someone, I installed the Script, but who cr

  • How to hide or disable the vertical and horizontal scroll bars?

    I would like to hide or disable scroll bars vertical and horizontal window of Firefox (20.0.1 at the moment), is there a CSS rule or the setting in "subject: config" resource for this behavior? Thanks in advance.

  • HP Pavilion Elite m9426f: need replacement of the graphics card

    I need a replacement for my ATI Raedon HD 3650 which burned and have no idea what to get. Sheet here http://h20564.www2.hp.com/hpsc/doc/public/display?docId=c01570954

  • PCI-Express?

    I looked on several review sites on my IBM Thinkcentre M52 9210 (the compact one, NOT the tour) and he says he has ONE PCI-EXPRESS X 16 expansion slot. I printed a picture of the PCI-E x 16 slot and compared it with that of my mahcine. It says it als

  • Reinstall the OS suite of crush hard drive

    Hi guys! I have a laptop g71-343us and unfortunately my hard drive has crashed after a virus attacked serious... I already bought a new hard drive because my warranty expired last 06/12/2010... can I reinstall my previous operating system which is wi