Global variable to capture username with Form 6i

Hi everyone,
I have a menu created with Forms 6i and the shortcut that I use to call the menu has in its target the following: C:\orant\BIN\ifrun60.EXE userid=username/password MYFORM.FMX
When I remove the username and password from the shortcut target it asks me for the username and password so when I typed, I am allowed to go into the application, but I want to be able to store the username on a global variable and put the value on a item when the user chooses the program that he or her wants to use, so they don't go to see other users information.
Can anyone please help me to do this step by step?
Thanks in advance!!

user626836 wrote:
Hi everyone,
I have a menu created with Forms 6i and the shortcut that I use to call the menu has in its target the following: C:\orant\BIN\ifrun60.EXE userid=username/password MYFORM.FMX
When I remove the username and password from the shortcut target it asks me for the username and password so when I typed, I am allowed to go into the application, but I want to be able to store the username on a global variable and put the value on a item when the user chooses the program that he or her wants to use, so they don't go to see other users information.
Can anyone please help me to do this step by step?You can developed a form named Login_form
Create On-Logon trigger at form level and provide the connection string like
declare
         uname varchar2(10);
         pass  varchar2(10);
     begin
         uname := 'user_name';
         pass  :='password';
         logon(uname, pass||'@orcl');
     end;now call only this form at your target... like C:\orant\BIN\ifrun60.EXE login_form
Hope this will help
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • Passing global variable values from databse to forms

    I am using forms 6i and database is oracle 9i.
    I am trying to run a form stand alone ( by pressing CTRL-R) without putting it in the application.
    since when this form is placed in the application menu it works fine as it has been passed global variables values from the database .
    now i am trying to run the form without menu and thus i want to pass the values of global variables .please let me know where should i pass these values in form .is it be WHEN-NEW-FORM-Instance trigger or in Pre-form trigger.
    i know what are the global variable values passing into the form from database.
    i can hard code any values to check if the form runs well or not.

    If you intend to do this sort of testing regularly you might want to consider creating a seperate form with a control block which allows entry of the name of the form you want to run, the names of the globals and their values, and do a CALL_FORM.

  • Can i pass parameter or global variable in view from 6i form

    hi master
    sir can i pass parameter or global variable in view from 6i form
    i use view for some diff column calculation within the date then i use
    where date between data1 and date2
    in view but view not create
    please give me idea how i pass external value in view
    thank
    aamir

    Hi Antony!
    I feel it may not produce the right results if you
    dont include the where clause and using only group by
    in view.You felt? Please clear, logical thoughts put here, not feelings.
    (It may very well have all the Debit, Credit
    for all the Accid where as the user wants only for
    r some date range)Data range is determinated in Form by user, so if view should give final data set then you must back
    on Ranjana first question: How to pass parameter or global variable to view from 6i form?
    And also as Ranjit pointed out, If you have only
    accid, sum(debit), sum(credit) in View, wheres this
    enddate ??Of course, column entdate (or enddate?) must be included in view...
    Cheers!

  • How can i find all global variable and parameters in a form?

    I don't know name of global variables and parameters,but i want get their name and value .
    how can i do? who can help me?
    Thank you.
    Daniel Liang
    2007.1.19

    no problem. As Francois said you can't do it programmatic in runtime.
    But when you use the debug-mode you can see each global with name and value.
    By the way: It's not good to not know all the globals in your application. This is one of the most important things you have to write down for your app. Create a wiki for such informations, so that all developer can share their information.

  • Capturing username in forms of Oracle Applications

    Hi
    I am developing a custom form , and i need to capture the username through code in forrms. Please let me know how to do it and what's the code
    Thanks

    Francois Degrelle wrote:If you are talking about the user currently connected in the Forms module, use the:
    Get_Application_Property( USERNAME );{code}But keep in mind that a lot of answers can be different between the C/S and Web versions, reason why it is required to systematically give the exact version you use when you ask questions.Francois,you are right....it can be achieved using the get_application_property... but in Oracle Applications it is most commonly used the profile value 'USERNAME' in order to get the username currently connected to the application....
    Greetings,
    Sim

  • How declear global variable in form and use all form

    hi master,
    sir,
    how i declear global variable in form and how use this variable in all form
    i have year table and pik current year or date form table and move in global variable and use in all form
    please give ma idea
    thanking you
    Aamir

    Ok, so, what characterset was your database created with?
    Does that characterset have a representation of that character?
    -Mark

  • Is it possible to intialize a text item with Global Variable

    Hi,
    I have forms10g, I want to initialize text item with current hour for this purpose I have defined one global variable and initialize text item(for hour) with this global variable.
    Defination of global variable
    :GLOBAL.my_var := TO_CHAR(sysdate,'hh24');
    Initial Value of form text item as
    :Global.my_var
    but when I run the form it raise error " ORA-01403 no data found " error
    I already check this global variable intialize properly with the current hour.
    Thanks and Regards.
    Khawar

    Hi Francois,
    Thanks for reply, but when I removed initial value property of text item from Global variable to other or Null form starts running, I have one Poplist and it populate with a procedure at form startup I remove it but no success.
    Thanks and regards.
    Khawar

  • Global Variable in report

    i am working with some global variables in all of my application including forms and reports. the global variables are created in the when new-form-instance trigger of the main form. the global variables are accessible throught the forms but i d,not know how i can access the same global variables in my reports. pls some one help me to solve the problem.

    If you only want to read the global parameters in Reports, you can pass them as parameters. Otherwise, you must put your global variables into a database table, for forms and reports are not sharing the same session.

  • Global variable in BR

    Hi,
    I have created one global variable (run time prompt) in which Budget admin will pass the scenario member parameter and I have also created a local run time prompt in one rule(which will pick up the scenario member from the input form POV with which the rule attached to) and inside the rule I am checking one condition that if the global variable value is equal to the local variable, then it will execute one calculation.
    As I want that the modify priviledge to change the value of global variable will be only with Budget Admin, so I have defined that at the time of Global variable creation. I chose Member from scenario dimension with the default value 'Budget'.
    I have hidden the local variable in input form. I have set 'run on save' with the 'Use Members on Data form' and 'Hide' option. The default value for local variable is also 'Budget'.
    As I have not hidden the global variable, so at save, pop up coming for the global variable. My problem is that, if I do not hide the global variable, then other user can modify the value, so my purpose is defeated.Otherwise rule is running ok.
    And If I hide the variable, then error is coming "The following value is not valid for the run time prompt it is entered for: ."
    Not understanding what is missing here. Can you please suggest the relevant solution/work around...
    Thanks & Regards.

    Hi John,
    Thanks for the reply and suggestion. But,actually my purpose was to match the budget-admin's scenario with the user-input form's scenario (and depending upon that we will pick up other member intersections and do the calculation for those combination only. So, two set of BR execution seperately will not solve our problem.
    Meanwhile, I tried hardcoding the global variable for debugging, keeping only the local variable picking value from input form. Now getting error that value is not valid for prompt as below---
    "The following value is not valid for the run time prompt it is entered for: ."
    Is my local variable not picking any value from input form....
    Can you please put some light on the issue?
    Thanks & Regards.

  • Global variable and timer

    Hi,
    I have a really amazing problem. I have a form with a when-new-from-instance-trigger. In this trigger I create a timer. The timer reads some information and should pass them to a global variable. For testing my form I pass additionally the global variable value to a text object. After the timer I want to use the global variable value for a where condition in a sql statement. But I get always the no_data_found exception and the value of the global variable is empty! What happens with my value? Does anybody know about such a problem? Please help.
    Thanks Mandy

    My question is, why are you starting a timer from a When-new-form-instance trigger? If all you are doing in the when-timer-expired trigger is some SQL lookup, why don't you do it directly in the when-new-form-instance trigger?
    Timers, no matter how short a time span, do not expire (and run the when-timer-expired trigger) until everything else is done, and control switches to the user (form is ready to accept user input from mouse or keyboard). The only exception is in web forms where you start a timer with 0 (or maybe 1, I don't remember) millisecond -- in that case, Forms runs the when-timer-expired code immediately.

  • Need help on global variables / parameters

    Hi friends,
    Please let me know if there a way to see the list of global variables and parameters in a form.
    Thanks
    Joe.

    I presume you mean at runtime, since at design time parameters are in the Navigator, and globals can only be created at runtime. But unfortunately at runtime there is no way to get a list of them, like you can with blocks and items. (There's no easy way to get other objects either, like LOVs, canvasses, etc., though most of them can be derived from properties of items). But let's say you thought you knew the name of a parameter or global and wanted to confirm it really exists. With parameters there is no solution; you can't use find_item(). With globals a common technique is the following:
    t_name := 'global.var';
    default_value('SoMe ImPoSsBlE VaLuE', t_name);
    if name_in(t_name) = 'SoMe ImPoSsBlE VaLuE' then
    -- the global did not exist!
    erase(t_name);
    else
    -- the global did exist!
    null;
    end if;
    And of course remember that globals are not owned by a form; they are visible to all forms that are running.

  • How do I set global variables for use by ALL form1.#subform[0] items?

    Hi All,
    I know how to code javascript but am new to Adobe LiveCycle.  When I open script editor, I have the following code (all code is in un-bolded):
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    // BEGIN: SET GLOBAL PRICES //
    var Cityscope_Sydney_CostUser1 = 60.39;
    var Cityscope_Sydney_CostUsers2to5 = 3.02;
    var Cityscope_Sydney_CostUsers6to20 = 1.21;
    var Cityscope_Sydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_Sydney_CostHardCopyWithoutOnline = 54.67;
    var Cityscope_Sydney_CostHardCopyAdditional = 14.59;
    var Cityscope_NorthSydney_CostUser1 = 48.40;
    var Cityscope_NorthSydney_CostUsers2to5 = 2.42;
    var Cityscope_NorthSydney_CostUsers6to20 = 0.97;
    var Cityscope_NorthSydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_NorthSydney_CostHardCopyWithoutOnline = 43.54;
    var Cityscope_NorthSydney_CostHardCopyAdditional = 14.59;
    // END: SET GLOBAL PRICES //
    ----- form1.#subform[0]::enter: - (FormCalc, client) -----------------------------------------------
    ----- form1.#subform[0]::exit: - (FormCalc, client) ------------------------------------------------
    ----- form1.#subform[0]::calculate: - (FormCalc, client) -------------------------------------------
    ----- form1.#subform[0]::validate: - (FormCalc, client) --------------------------------------------
    ----- form1.#subform[0]::preSave - (FormCalc, client) ----------------------------------------------
    <<======= etc etc etc =======>>
    ----- form1.#subform[0].Item1Cost::initialize: - (JavaScript, client) ------------------------------
    ----- form1.#subform[0].Item1Cost::enter: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::exit: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    //Store form values in user-friendly names.
    var AreaSelected = Item1Area.rawValue;
    var NumberOfUsersSelected = Item1Users.rawValue;
    //Declare other vars.
    var Users1Calculation;
    var Users2to5Calculation;
    var Users6to20Calculation;
    //Calculate individual User Cost "components" based on number of users selected for the area.
    switch(true)
    case (NumberOfUsersSelected < 2):
      Users1Calculation = NumberOfUsersSelected * Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 0.00;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 1 && NumberOfUsersSelected < 6):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = (NumberOfUsersSelected - 1) * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = 0.00;
      break;
    case (NumberOfUsersSelected > 5):
      Users1Calculation = Cityscope_Sydney_CostUser1;
      Users2to5Calculation = 4 * Cityscope_Sydney_CostUsers2to5;
      Users6to20Calculation = (NumberOfUsersSelected - 5) * Cityscope_Sydney_CostUsers6to20;
      break;
    default:
      alert("BROKEN: Calculate individual User Cost components based on number of users selected for the area.");
    //apply total cost for this item
    Item1Cost.rawValue = Users1Calculation + Users2to5Calculation + Users6to20Calculation;
    ----- form1.#subform[0].Item1Cost::validate: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseEnter: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Cost::mouseExit: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::change: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::full: - (FormCalc, client) --------------------------------------
    ----- form1.#subform[0].Item1Cost::mouseUp: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::mouseDown: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::click: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Cost::preSave - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Cost::postSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::prePrint - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::postPrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Cost::preSubmit:form - (FormCalc, client) -----------------------------
    ----- form1.#subform[0].Item1Cost::docReady - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::docClose - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Cost::ready:form - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Cost::ready:layout - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::initialize: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::enter: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::exit: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::calculate: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::validate: - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::mouseEnter: - (FormCalc, client) -------------------------------
    ----- form1.#subform[0].Item1Users::mouseExit: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::change: - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::full: - (FormCalc, client) -------------------------------------
    ----- form1.#subform[0].Item1Users::mouseUp: - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::mouseDown: - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::click: - (FormCalc, client) ------------------------------------
    ----- form1.#subform[0].Item1Users::preSave - (FormCalc, client) -----------------------------------
    ----- form1.#subform[0].Item1Users::postSave - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::prePrint - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::postPrint - (FormCalc, client) ---------------------------------
    ----- form1.#subform[0].Item1Users::preSubmit:form - (FormCalc, client) ----------------------------
    ----- form1.#subform[0].Item1Users::docReady - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::docClose - (FormCalc, client) ----------------------------------
    ----- form1.#subform[0].Item1Users::ready:form - (FormCalc, client) --------------------------------
    ----- form1.#subform[0].Item1Users::ready:layout - (FormCalc, client) ------------------------------
    ...and so on and so forth....
    In short, I want the code within:
    ----- form1.#subform[0].Item1Cost::calculate: - (JavaScript, client) -------------------------------
    ...to be able to access the variables I have created in:
    ----- form1.#subform[0]::initialize: - (FormCalc, client) ------------------------------------------
    (I have assumed that this is where I would store Global variables)
    At this stage, the global variables cannot be accessed with the configuration above.  The only was I can get this to work is to cut and paste the global vairables into each form1.#subform[0] item, which of course defeats the purpose of global variables!  I plan to have many more items so would not want to duplicate the global variables for all of them!
    Can somebody show me how to do this?
    Any help is very much appreciated!
    Thanks
    Stanbridge
    Message was edited by: stanbridgej - colors and or fonts won't save.  Have bolded my question to make code (non-bolded) easier to read (I hope).

    Hi MorisTM,
    Thanks for the reply!
    Yes, I saw that option (I should have mentioned I already knew about it), but was wondering if there is a way I can do this via code.
    There are two reason I want to be able to do it via code (only one of which may be valid):
    1) I can automatically generate my pricing code form another inhouse app.
    2) I am hoping that later on once I get this working I will be able take it a step further and get the data directly from a MySQL database!
    Cheers though!
    Any other suggestions?
    Regards,
    Stanbridge

  • Mapping global variables

    Hi,
    I have written a UDF which returns data in the form of a string with comma ',' seperated.
    I wanted to get each value seperately and directly map them to the output data type.
    Is it possible to seperate the string that is comma seperated and pass them into Global variables and use global variables to directly map with reciever datatype?
    Or is there any other method to handle this using other existing functions to split the returned value?
    Please help. Thanks in Advance
    Rohan.

    Hi,
      Is it possible to seperate the string that is comma seperated and pass them into Global variables and use global variables to directly map with reciever datatype?
       I think Java mapping is good for this scenario....
    Regards,
    Vivek LR

  • Passing values to global variables while running job via management console

    Hi All,
    I have a requirement, where I have to use HANA view with input parameters as source. I am doing the same by placing the HANA query for view with input parameters, in SQL transform and assigning values to placeholders using global variables. This is working fine at the designer level.
    But where I am stuck is, it possible to pass values to global variables while running job in Management console or in a third party scheduler. Should I do any changes in the batch job to achieve the same ?
    Please help me with the same and also let me know whether my approach of using Global variables to assign values to input parameter of HANA view is right?
    Thanks,
    Deepa

    Select Batch > Batch Job Configuration > Add Schedule and Expand the Global Variables section in the Schedule Batch Job tab. You can then specify a value for all your global variables.
    Alternatively, work with control tables and assign values to the global variables in an initialisation script.

  • Why do global variables have a .vi extension?

    Hi,
    While cleaning up some code the other day, it occured to me that although Virtual Instruments and Global Variables are distinct entities with separate roles in the LabVIEW environment, they share the same file extension .vi. It seems much more logical to assign a unique extension like we already do for controls, menus, classes, etc.
    Can anyone explain why it's done this way?
    Thanks!
    Solved!
    Go to Solution.

    No terminals on a global's BD.  Just a blank slate.  You CAN put stuff there but if there is any reference to a FP object LabVIEW will blow up on you so there is no real easy way to pass data in or out. (I once thought of embeding a counter into a global-  It was not pretty)
    Regardless, no matter what you COULD do, there must be another legitamate way to do the same thing.  Its basically "Trickery or witchery."  Do that kind of thing at your own risk! (Don't try this at home- We are professionals)  Since you shouldn't be there, there are fewer protections.  BAD things CAN and likely WILL happen.  Think of it like triing to drive a car on two wheels.   Its possible but, perhaps you want to try it with a really cheap car and know someone good with body repair.
    Jeff

Maybe you are looking for

  • My iPad has been stolen, I need some help with the Find my iPhone app and iCloud please

    Hello people.  I have (had) an iPad 1 (wifi only) - which was stolen two days ago.  It's locked with a passcode but I am worried that someone will be able to get into it.  I've got the Find app installed on my iPhone 4S and it shows that both my iPad

  • Principal Name for Active Directory "Domain Users"

    Hi, I successufully integrated Weblogic & Active Directory Kerberos (SSO). I tested a web application and successifully logined it with authentication. The system automatically recognized my Active Directory username. It worked. For authentication in

  • JTree path

    I built a JTree thanks to several DefaultMutableTreeNode, wich were instantiate by: new DefaultMutableTreeNode ( MyCategory ); MyCategory is an object from a class I made by my self (class CategoryNode) The snag is, once I have this tree, I retrieve

  • Composite photo and background layer question

    I would appreciate some help with a workflow problem when dealing with a composite, selection and background layer. My normal workflow is to start of in LR4, and if need be do an "edit in, CS6". I am relatively new to CS6, so bear with me. I have som

  • Aerender error codes... Anyone know of a list

    Is there a list of aerender error codes? I can't find one. I'm getting "aerender ERROR -1712: AESend failed to send apple event at line 751" on an aerender and would love to know what that means. It only started happening once I started using the -re