If Else within Form

I am creating a form to add employees into an employee
database. In the form I have 2 radio buttons displaying Office1 and
Office2. If the user selects Office 1, then a droplist should
appear displaying Departments for Office 1...the same goes for
Office2 and its departments. How do I create this if else statement
within a form before submission? Do I use Javascript? Thanks for
the help..

As always, it depends.
You don't need Javascript, unless you want a page reload
without someone clicking submit. If you preload everything to the
web browser before with Javascript, you don't need AJAX. If you
want in-line updates without reloading the entire page and
pre-populating Javascript, you need AJAX.
So it can be done any which way...the way you want the user
to interact with the site is what determines the route. Chances
are, Javascript is a necessity.
AJAX in this case is often the most user friendly, though it
should degrade gracefully (work without Javascript). Tools like
JQuery make it easy and fun, but it does get funky thinking the
degradable way.

Similar Messages

  • Easy Question: How to identify user roles within form?

    Hi folks,
    I would like to display/hide button which calls static data maintenance form (from other form) based on current user roles.
    If user has role "STATIC_DATA" granted then DISPLAY button (which calls static data form), else DO NOT DISPLAY it.
    Any example, how to get user roles within form?
    Thanks,
    Tomas

    I can do it with below code:
    declare
      l_cnt number;
    begin
      select count(*)
         into l_cnt
         from user_role_privs
      where granted_role = 'STATIC_DATA';
      if l_cnt > 0 then
            -- display it
      else
         -- do not display
      end if;
    end;I think, above should work.
    Thanks,
    Tomas

  • Oracle Forms 11gR2 - Cannot deploy locally from within Forms

    I cannot deploy locally from within forms.  The server is up and running and I can deploy the form by putting the correct URL in the address line of the browser window.  When I try to deploy from within forms it comes up with some crazy URL that differs everytime.
    This is what the URL should be and this works from the browser:
    http://machinename:7002/forms/frmservlet?form=WRD608ADMIN_11g.fmx&userid=&otherparams=useSDI=yes
    Here is one of the URLs it came up with when I try to run it from within Forms:
    http://localhost:60231/lysVL2VjqT33znjfvLwanktVRxTIc6dEwVeRNXXRmhYU2qjf
    Localhost is always there, but the rest varies.
    In Forms, I have the Preferences, Runtime set to:
    http://machinename:7002/forms/frmservlet
    Where machine name is my PC, it is the same for this address as the URL above that works directly from the browser.
    So what am I missing?
    Thank you in advance.

    Generally speaking, it is discouraged to manually edit any of the configuration files if they are managed by WLS Console or EM.  In this case, default.env is managed by EM.  Therefore, changes to the file should be done through EM.  If however, you want to alter the file manually, the following is likely the best way to accomplish this:
    1.  Stop the WLS Admin Server and Node Manager
    2.  Locate the proper file you wish to edit.  By proper I mean, there are several copies of most config files.  Most of the config files found in the Oracle Home are actually template files and are not used at runtime.  Altering these will not give you the change you want.  The default.env you want would be here (assuming Windows)
    C:\Oracle\Middleware\user_projects\domains\ClassicDomain\config\fmwconfig\servers\WLS_FORMS\applications\formsapp_11.1.2\config
    If you are using a "Development" installation type, the above path will reflect AdminServer instead of WLS_FORMS.  Remember that Development installations are not for multi-user purposes.  Production deployments require the "Deployment" installation type, which can also include the Builders.
    Do NOT make any changes yet.
    3.  Once you find the correct file, create a backup copy.  Then open the file for edit (not the backup).
    4.  Make the desired changes and save.
    5.  Restart Node Manager and Admin Server if you plan to use them.
    For more information about using EM to manage your configuration, refer to the product documentation:
    http://docs.oracle.com/cd/E38115_01/doc.111210/e24477/configure.htm#CHDCCGHI

  • Creating a Folder Within Form or Document Library & Display the name not in the name column.

    I have created a form library that will used to create folders within that. The folder creation is done using an InfoPath Form that has been uploaded to the Form Library. When the new folder was created the name will be displayed at the Name column within
    the Form Library. I want to change that to another column like documents or suchlike.
    Can it be done using InfoPath 2010 VSTA C# or not? If their are other options available please could you try to inform me!
    Thank You,
    Chiranthaka

    Hi,     
    If you want to show the name of folder in another column, a workaround is that you can create an extra column, then create a SharePoint Designer workflow to set the value of
    this column with the name of folder.
    Here is a link about Create Workflow using SharePoint Designer and set field value for your reference:
    http://www.codeproject.com/Tips/419037/Create-Workflow-using-SharePoint-Designer
    I have seen a similar post from you in the link below:
    http://social.technet.microsoft.com/Forums/en-US/c3ff3f17-dbe2-40f9-86c5-ff7d4b663f09/creating-a-folder-within-form-or-document-library-display-the-name-not-in-the-name-column?forum=sharepointcustomizationprevious
    It's recommended that you post a single question in a single thread which will make it easier to be discussed by others.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Create a jdbc connection within forms

    I have created a little piece of java code that connects to my database via a jdbc connection, inserts a value into a table, commits, then closes the jdbc connection.
    This works perfectly in JDeveloper.
    Now, I need to use it within forms, but forms is throwing an exception in the java console: [I have signed the file]
    and I also get an alert that says "FRM-92100: Your connection to the Server was interrupted. This may be the result of a network error or a failure on the Server. You will need to reestablish your session."
    I'm assuming when my java code tries to do a jdbc connection, it conflicts with the already established forms connection. Does anyone have any suggestions on how to overcome this?
    -----------------java console exception-----------------
    java.lang.IllegalAccessException: myconnection
         at java.lang.Class.newInstance0(Native Method)
         at java.lang.Class.newInstance(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.ButtonItem.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    ------------------java code-------------------------
    NOTES: of course I have taken out the real ip
    address, the db name, and the login and password.
    import java.sql.*;
    import java.io.*;
    import oracle.jdbc.driver.*;
    import oracle.forms.ui.VButton;
    class connection extends VButton
    public static void main (String[] args) {
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String url = "jdbc:oracle:thin:@<ip>:1521:<databasename>";
    Connection conn = DriverManager.getConnection(url,"<login>","<password>");
    Statement stmt = conn.createStatement();
    ResultSet rs;
    rs = stmt.executeQuery("insert into lh_test (my_name) values ('this')");
    rs = stmt.executeQuery("commit");
    conn.close();
    } catch (Exception e) {
    System.err.println("Got an exception! ");
    System.err.println(e.getMessage());

    Hi 348874,Frank
    Frank,do you thinck that if this java class would extend VBean,instead of VButton will it make any diffence?(I mean,it do has a main method,wich isn't executed when the VButton initialises).
    Ín fact,when having a closer look into the java class(wich ,obvioulsly I didn't last time) I'm quite confused...why is this exception raising?
    This Component should do nothing in fact,when inserted into a form.
    As far as I know,from Forms Applet point of view,this class should be exactly a VButton,because the constructor and init() method are exactly the ones inherited from VButton(This class isn't adding anything to VButton)...Am I wrong??

  • Querying data from External Source from within FORMS

    I have a form that is built based on Oracle tables.
    I need to execute a Select statement via ODBC from within Forms procedures. This is going to a SQL Server DB to get some information for validation purpose.
    I do not need to bring this in to a Forms Block.
    Any thoughts?
    Thanks

    Hi
    What version of forms do you use? If you use forms 6i, take a look at the EXEC_SQL package. You can access oracle databases and ODBC databases (using OCA) independently of the main database connection -- well, I never tried but that is what the documentation says.
    I am not sure about version 9i... the package is there, but I could not find anything in the help about it (what is not a good sign...)
    hth
    Luis Cabral

  • Using JMS and Advanced Queuing within forms.

    I am wondering if anyone can forsee problems with embedding a javabean inside a form that:
    listens to an Oracle queue.
    Do you think there would be some type of problem with a connection factory trying to create a connection and a session from within forms using JDBC?
    Thanks in advance

    Sandu,you are right.
    A Forms timer with status polling is a good and stabil solution .
    But we are connected on a database and a polling of a database event - Job is finished, or a reply received in a Queue -
    is always a network traffic and overhead when we use polling times < 1 min ..
    It would be also a good solution and interesting feature of Forms that the database event sends a message to the waiting client (process ?) ..

  • Urgent: Selection-screen within Form routines

    Hi Experts,
        Within Form routines can i declare selection-screen statements. If no how should i declare my objects on selection screen within form routines bcoz when i declared with selection screen statements within form routines iam getting the error as "Within FORM routines and function modules, the SELECTION-SCREEN statement is not allowed".          
    Regards.
    AADI.

    Hi Aditya,
    U cannot use the Selection-screen in Forms and Function Modules.
    Try to use it in an include program and call it from ur program.
    Reward if Helpful,
    Jagadish.

  • Grant privileges, roles within Forms

    Hello,
    i have a forms application where each year can appear new users (e.g. employees), and i when a new employee appears i wanna grant him privileges, roles, etc within Forms. so is it possible having a form(accesible just for dba user) from where he can assign roles to another users ? (in employee table i have a column 'username'). also, when i insert a new employee, in post-insert query (i think) is it possible to have something like
    create user .... identified by ....... but here is a problem.. where can i write the password?
    Please clarify :)
    Regards,

    Roger22 wrote:
    but when i run the script how can i specify the password?what do you mean by specify the password? What's exactly your problem/requirement with specifying the pw?
    You can do this in forms using forms_ddl, but I'd use a database procedure for this which creates the user, does the granting stuff etc.
    e.g.:
    create or replace procedure createUser(ivUsername in varchar2) is
      cursor cGrants(cvUsername varchar2) is
        select 'grant '||decode(object_type, 'TABLE', 'select, insert, update, delete ', 'PROCEDURE', 'execute ', [...])|| ' to '||cvUserName as grant_stmt,
                 'create synonym '||object_name||' for '||cvUserName||'.'||object_name as syn
        from user_objects
        where object_name != 'CREATEUSER'
        and object_name not in (select synonym_name from all_synonyms where owner = upper(cvUserName);
    begin
      execute immediate 'create user '||ivUserName||'identified by '||ivUserName||' default tablespace my_tbs temporary tablespace my_temptbs quota unlimited on my_tbs';
      execute immediate 'grant connect, resource to '||ivUserName;
      for rGrants in cGrants(ivUsername) loop
        execute immediate rGrants.grant_stmt;
        execute immediate rGrants.syn;
      end loop;
    end;
    /A user with pw = username get's created (maybe you should provide your users a pw change functionality to change their passwords afterwards), he gets granted all the privilages to objects from the current user, and also synonyms get's created (if you want to use this the calling user should have the create any synonym privilage). Beware: If you want to do this you MUST NOT grant this procedure to the other users (so object_name != 'CREATEUSER') or use any other database procedures in it, as you'll get a lock when executing the grant statement and the procedure hangs.
    If you want to manage more schemas, you could create this procedure with the system user, modify the cursor to do a query on all_objects and restrict it to the schema from where you want to grant the privilages to (grant execute on schema.object to user), and pass the schema and the user to create to it.

  • Running package within forms

    Does anybody know how to run a package within forms (in the background?)
    Example: I need to run a package to update some tables but I don't want the user to have to wait for that package to complete before making modifications to the form. It is less than a 10 second wait but it appears that the form is hung up.
    thank you.

    Before you start the process, your form could display a stacked canvas telling the user to wait, and then after the package returned control to the form, the form could hide the canvas.

  • Access other_params within forms 9i

    Hello,
    I'd like to determine the output directory when using the Forms TEXT_IO utility
    in the formsweb.cfg (of the OAS) as other_params.
    This would facilitate maintenance and it is more flexible.
    But I do not know how to access this parameter within Forms 9i.

    Hello,
    I know, that with the TEXT_IO package it is written on the machine of the OAS. However my problem is as mentioned how to access external parameters within forms.
    I wrote in formsweb.cfg:
    [my_section]
    otherparams=myparam1=%alpha% myparam2=%beta%
    Then in the Form WHEN-NEW-FORM-INSTANCE Trigger:
    DECLARE
    outdir VARCHAR2(100);
    BEGIN
    TOOL_ENV.GETVAR('myparam1', outdir);
    :GLOBAL.export_dir := 'd:/oas/Apache/Apache/htdocs/'||outdir||'/';
    END;
    The URL looks like
    http://station:7778/forms90/f90servlet?config=my_section&form=d:\myform.fmx&userid=
    But I get the Error: FRM-47023:
    Form MYPARAM1 does not contain a parameter named MYFORM
    What is wrong here ??
    I tried it also with the URL:
    http://station:7778/forms90/f90servlet?config=my_section&otherparams=myparam1=outdir&form=d:\myform.fmx&userid=
    although I would like to have the information (alpha) only in the formsweb.cfg
    Thanks

  • WEBUTIL within form Problem

    dears,
    i was design an form that read an excel sheet and upload the excel sheet contant into a table on DB, the excel sheet contain only 2 columns, the problem is when i compile the form CTRL+K there is no errors shown but when the form run i click Browes button but it give me error as below
    ORA-06508 PL/SQL could not find program unit being called .
    the program unit is client_get_file_name it a package within WEBUTIL attached library, the problem is the form cant call any package or anything from WEBUTIL attached library.
    on the form i have 2 buttons
    First Button Code: "Browes"
    Declare
    V_FILE     VARCHAR2(2000);     
    BEGIN                              
    V_FILE := client_get_file_name(NULL, NULL, NULL, NULL, open_file, TRUE);          
    :main_block.FNAME := V_FILE;
    EXCEPTION               
    WHEN OTHERS THEN
    my_alert('There Is Error: '||sqlerrm); -- My_alert(p_text) is program unit
    RAISE FORM_TRIGGER_FAILURE;
    END;
    Second Button code : "Import to DB"
    DECLARE
    MYFILE CLIENT_TEXT_IO.FILE_TYPE;
    filename varchar2(100);
    temp varchar2(1000);
    t1          varchar2(1000);
    t2          varchar2(1000);
    cust_id number;
    dfrom     date;
    dto          date;
    ccode     varchar2(100);
    r     varchar2(1000);
    transfer_status     boolean;
    begin
    filename := :main_block.fname;
    MYFILE := CLIENT_TEXT_IO.FOPEN(filename, 'r');
    SYNCHRONIZE;
    SYNCHRONIZE;
    CLIENT_TEXT_IO.get_line(MYFILE,temp);
    t1:=temp;
    while temp is not null loop
    CLIENT_TEXT_IO.get_line(MYFILE,temp);
    t1:=temp;
         select      substr(t1,1,instr(t1,',') -1)
              into           t2
              from           dual;
              ccode:=t2;
              select      substr(t1,instr(t1,',') +1)
              into           t1
              from           dual;                               
              insert into trc_upload -- table on DB
              values(t2,t1);
              commit;
         end loop;
    CLIENT_TEXT_IO.FCLOSE(MYFILE);
    EXCEPTION
         WHEN DDE.DDE_APP_FAILURE THEN
         my_alert('WINDOWS APPLICATION CANNOT START.');
         WHEN DDE.DDE_PARAM_ERR THEN
         my_alert('A NULL VALUE WAS PASSED TO DDE');
    WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
    my_alert('DDE CANNOT ESTABLISH A CONVERSATION');
    WHEN DDE.DMLERR_NOTPROCESSED THEN
    my_alert('A TRANSACTION FAILED');
    end;
    so please to help me on this issue
    Note:
    the form deployed under UNIX on Application Server
    Thanks
    Murad.

    From ORA-06508 is seems like WEBUTIL.pll is not found in the runtime-environment.
    Possible solutions:
    Check if the WEBUTIL.pll (or plx) is on the path where the fmx-File is placed.
    If not, check the FORMS90_PATH in your env-File (normally default.env) (you didn't mention your forms-Version, may also be FORMS60_PATH) and if the WEBUTIL.pll is in that path, if not adjust the env-file.
    If its still not working, check if WEBUTIL.pll is attached including the full Path (unattach WEBUTIL.pll and reattach it without the path)
    Last hint: Case-sensitivity: If you attach in lowercase-letters and library is in uppercase on unix-system the library will not be found at runtime. You won't see how the the pll was attached, best method is to unattach library and reattach it in correct case.
    Another remark:
    The DDE-Exception seem to be useless, because you don't use DDE (and i would not work for its not available under unix).
    Hope this helps

  • How to display PDF BLOB file within Forms

    Hi All:
    I just want to know if is it possible to display PDF blob file within the forms. Currently I use webutil to open pdf in browser. This time I need to display it in forms, so that upon scrolling, the user can view the pdf images of that particular record.
    TIA

    Hello,
    <p>Did you see this Java Bean ?</p>
    Francois

  • SAPscript SQL within form possible?

    Hi All
    Is it possible for me to do a SELECT statement within the SAPscript form in SE71? I don't want to change the print program just to add one long text from T003T.
    Thanks,
    Adrian

    Hi,
    It is not possible to perform a select query within the SAP SCRIPT.
    I think you can go for an external subroutine. Check the below link for more details.
    http://wiki.sdn.sap.com/wiki/display/profile/ExternalSubroutinesinSAPScript
    Regards,
    Vijaymadhur.

  • Can't use mouse scroll within forms

    Hello,
    I have been working with SCSM 2012 since the public beta was released and I don't know why I haven't noticed this until my analysts said something but the mouse scroll wheel doesn't work within any of the forms. 
    It will scroll if you put the cursor directly over the vertical scroll bar but if the mouse is within the form its self it doesn't work.
    This is one of the most basic functionalities, is there any way to get that to work? 
    What is it about how the form is designed that doesn't allow the scrolling?
    I would be surprised if this is the first post anyone has made about this so if it's a duplicate I apologize.
    Thanks,
    Dustin

    Hi Dustin,
    I can confirm this bug, though if remember correctly, it only applies to some forms, not all. It's been reported on connect already, but please go vote on it:
    https://connect.microsoft.com/SC/feedback/details/753389/scrolling-with-mouse-wheel-in-throughout-the-system-is-inconsistent#tabs
    Regards
    //Anders
    Anders Asp | Lumagate | www.lumagate.com | Sweden | My blog: www.scsm.se

Maybe you are looking for

  • Satellite Pro A300D - What is the model number for the keyboard?

    My husband managed to dislodge a keycap on my keyboard, and broke the white scissor clip that holds hit on...(don't ask me how) He spoke to the authorised service centre here in Norway, and they sent us replacement scissor clips (actually they sent a

  • Item category related to Quotation, Statistical value field

    Hi All, IN my Project, Item category Y003 which is used in creation of Quotions, for which Statistical value is 'X' which means "No cumulation - Values can not be used Statistically". My requirement is I need to change this filed value to 'Y' which m

  • Which iPad 2 is best for me?  What uses the space up the most?

    Hi, I'm considering an iPad 2 purchase, but just wondering if I go for the 64GB model would it be space wasted? I don't plan on doing any video editing, and I won't store my main iPhoto library on it (but will likely keep a few photos on there for sh

  • Partial Period factoring

    Dear Friends, I have re-written the rule for Partial period factoring for LOP days and it is working fine.Now I need your help to do the same for mid-month joinees. Help needed in rewritting the second rule XPP1. This is working fine for LOP Days,Ded

  • Won't pick up incoming call

    My iphone4s won't pick up incoming call. outgoing call is working fine and all other voice notice is working fine too.......is there body know how to solve this problems?