How to set the value of a field from the LOV of another field.

I'm trying to figure out how to set the value of a field (P_PROGRAM) to the value of another field of based lov (P_STATE).

The P_PROGRAM field is a hidden field. The P_STATE field is a required field and is based on a list of values for the State Codes.

When a user selects the State to P_STATE, the field of the P_PROGRAM should be set to this value, as well.

I tried different ways to get there via a function call on the post for the calculation of the field P_STATE, defining the source P_PROGRAM to the value of the page item P_STATE put varialbles, creating a process before SENDING, and they all still come back as having a NULL value for P_PROGRAM, therefore impossible to create the file in the db as the PROGRAM is a mandatory field in the table.

Can you please help? Thank you, Laura

Laura,

It is always helpful if you provide information about the Apex version you are using. The Apex 4 you can use Dynamic Actions to achieve this. In earlier versions is possible using processes to submit or javacsripts, as well.

Heres how you do in 3.x with treatment to submit, to make it work in 4.0 as well.

1 do the P_STATE ' select list submits the Page.
2. Add a calculation on the point P_PROGRAM, or write to him assign a value based on a process. The treatment should be OnLoad after the header
3. If the page does not have an unconditional branch that loops on itself, add a. NOTE: The direction must be the last branch (larger sequence number) and should have checked "Save Session State".

This is what will happen
a. when the State is selected Page will be submitted
(b) it will take the unconditional branch to himself and save the value of P_STATE
c. the calculation process / fills the value of the P_PROGRAM element when the page reloads

Kind regards

Tags: Database

Similar Questions

  • How to set the LOV when in a pop up

    Hello!!!

    We work with ADF 11 g and the user wants to use a LOV a field during their research and another when they change the information in a pop-.

    I have the popup work and we may change the information but I can't understand how to have a different of LOV show when the user is in the pop-.

    I've set the attribute VO use 2 LOV and I added a transitional attribute to the VO and picked up as a list of value switch but I can't figure out how to set the transient attribute when the pop-up opens
    so that it will use the 2nd LOV while in the pop-up etc and then together is back to normal when they are not on the shortcut menu.

    Everyone comes through this?

    Thanks in advance.

    The best solution I found for this was using two different views and then link them. This allows a different LOV will basically be attributed for the same attribute. Be sure to use the correct view on the specific form for the desired LOV.

  • How to set a value in a field with condition in a report?

    Hello

    In my report, I want to change a value of a field when it checks certain conditions.

    How can I realize this process?

    Help.

    Regardly.

    Hello

    You can use the internal commands SRW. SET_FIELD_NUM or SRW. SET_FIELD_DATE or SRW. SET_FIELD_CHAR in the trigger of Format:

    Examples can be found here:

    SRW. SET_FIELD_NUM:
    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_set_field_num.htm

    SRW. SET_FIELD_DATE:
    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_set_field_date.htm

    SRW. SET_FIELD_CHAR:
    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_set_field_char.htm

    Concerning

  • How to set the values of dependent choice list fields

    Jin

    I create a drop-down list in my page.
    This list of choices has values. (coming from the vo)
    What value I chose from the drop-down list that display certain fields value.
    for this I take the value of the drop-down list and set this values to these fields.
    its working fine.

    but my doubt is, at the time of the loading page, these fields (list selection dependent fiedls) defaulitly contains a value
    (this is one of the value of the vo)

    But I don't want to see any value at the time of the loading of the page
    Here, contains values null or empty fields at the time of the loading of the page.

    Hello

    Instead of linking these text fields display attributes... create transient attributes in VO and link these transitional
    the attributes of these text fields.

    Now you load the page set the transient attribute ' ' using row.setAttribute("Attribute","");

    In addition, as the Pickist value is changed, and then also, you can set the value as you wish...

    This will allow to permanently solve the issue.

    Thank you
    Gerard

  • How to set the alignment of the field in a table in jdev 11.1.2.3?

    Hello
    How to set the alignment of the field in a table in jdev 11.1.2.3?
    for example: to display a body of numbers in a table as right aligned.
    I tried to put field (amount) VO UI Hint Format Type: Number; Format: 0000.00
    and jspx, flowing, but it doesnot work.
    Thank you.
    Bao

    < af:column sortProperty = "#{bindings." VO1.hints.amount.name}.
    sortable = "true".
    headerText = "#{bindings." VO1.hints.amount.label}.
    ID = "c44" width = "60".
    Align = "center" >
    < af:inputText value = "#{row.bindings.Amount.inputValue} '"
    label = "#{bindings." VO1.hints.amount.label}.
    required = "#{bindings." VO1.hints.amount.mandatory}.
    columns = "#{bindings." VO1.hints.amount.DisplayWidth}.
    maximumLength = "#{bindings." VO1.hints.amount.precision}.
    shortDesc = "#{bindings." VO1.hints.amount.ToolTip}.
    ID = "it58.
    secret = "false".
    inlineStyle = "" text-decoration: overline; ">"
    < f: validator binding="#{row.bindings.Amount.validator}"/ >
    < / af:inputText >
    < / af:column >

    Hello
    To set a field right alignment in a table:
    It doesnot work when InlineStyle-> text-align: right;
    It works when ContentStyle-> text-align: right;

  • How to set the value of something in a component of the main application?

    Hello

    Maybe I've worked on it too long, but I can't understand how to set the value of the text property of a text entry field in my main application component in a block of mx:Script. I have a component called Login in the components folder, and I need to set the text value of empNum. In my statement of mxml up there, I said these components such as xmlns = "components.*" so, logically, the property, I'm putting a c.Login.empNum.text. I can't understand the correct syntax to make this work, and I've tried everything I can think of. Does anyone have any suggestions? I think this should be easy, and there is just something missing me.

    Thank you!
    Holli

    Have you tried to give him an id?

    If later you can make the loginScreen. empNum.text = "my text".

    Laurent,

  • How to set the value of a variable in a cluster in LabVIEW to c#?

    Hi guys, I'm working on a small c# program, which by using the interface provided by LabVIEW.  And I know that, with the help of lv. SetControlValue (name, value) can set a variable just on the front panel. But in my case, there are several groups on the front panel. Then it confused me how to set the variables in these groups. For example, there is a cluster named clusterA and a variable named a., I tried something like this:

    lv.SetControlValue("clusterA.valueA",1);
    

    but it totally inoperable. Everyone has some experience with this sort of thing? Thank you very much!!

    Hey guys, thanks a lot for all your response. I just found a simple way to solve this problem. For example, there is a cluster named "ClusterA", and there are only two witnesses, who are: an int value named "IntA" (default = 10 IntA value) and a string value named "StringA" (by default the StringA = 'abc'). In c#, if you call the method:

    var clusterA is vi (Array). GetControlValue ("ClusterA");

    you will get a table looks like: clusterA = {10, 'abc'}; So if you want to change IntA 123, you simply do:

    clusterA.SetValue (123, 0); 123 the value, 0 is the index of IntA in clusterA, after this clusterA table = {123, 'abc'}

    After that, simply to make the table in LabVIEW using:

    VI. SetControlValue ("ClusterA", clusterA);

    and now you see the LabVIEW, IntA is changed.

  • How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Mr President.

    How to set the default value of the attribute with a sequence number? Is it possible to add a string to seq.no. like abc0001?

    Concerning

    For the date, you can use groovy expression adf.currentDate to set the current date. reference http://adfgouravtkiet.blogspot.in/2012/11/how-to-set-default-values-for-entity.html

    You already have ways to use the sequence.

    How do you add a new value in the form. You're creating a new line of your page (user interface) and by engaging with validation operation? Unless you commit you will not be able to see anything in the table.

    Thank you

  • How get/set the value of the DataObject object in the task of the API?

    How get/set the value of the DataObject object in the task of the API?

    Are there examples of code availible?

    Hello

    You are here: http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_worklistcust.htm

    Antonis

  • How to set the initial value programmatically in af:selectOneChoice

    Hi all

    How to set the initial value programmatically in af:selectOneChoice

    filled with view object instance, but I want to show the value initial programmactically

    This can help you: Re: how to set the default value of the component selectOneChoice in ADF

    and the default af:selectOneChoice programmatically from backing bean

  • How to set the render property of the field on one facet of panelSplitter?

    Hi, experts,
    In jdev 11.1.2.3,.
    How to set the render property of the field on one facet of panelSplitter?
    -If the panelSplitter is reduced then make some fields in the second pane. otherwise, do not make these fields.

    It is not an easy job for me to set the EL expression.
    Thank you.

    OK, just did a small test case. It turns out that the difficulty is to automatically update the fields when the separator discloses. To add a pair of earphone client/server. This sends the event to disclose to the bean to update the fields.
    Page code:

    
    
      
      
        
          
            function disclosePanelSplitter( event) {
                var inputComp = event.getSource();
                AdfCustomEvent.queue(inputComp, "myDiscloseEvent",
                {}, true);
            }
          
          
            
              
                
                  
                
              
              
                
                  
                    
                      
                      
                        
                      
                      
                      
                      
                    
                  
                  
                    
                      
                      
                        
                          
                          
                          
                          
                          
                        
                      
                      
                      
                      
                    
                  
                  
                
                
              
            
          
        
      
    
    

    and the corresponding bean to the scope of the request

    package de.hahn.xyzxyz.view.panelsplitter;
    
    import oracle.adf.view.rich.component.rich.layout.RichPanelSplitter;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.render.ClientEvent;
    
    public class PanelSplitterBean {
        private RichPanelSplitter panelSplitter;
    
        public PanelSplitterBean() {
        }
    
        public void setPanelSplitter(RichPanelSplitter panelSplitter) {
            this.panelSplitter = panelSplitter;
        }
    
        public RichPanelSplitter getPanelSplitter() {
            return panelSplitter;
        }
    
        public void doCustomEvent(ClientEvent event)
        {
            AdfFacesContext.getCurrentInstance().addPartialTarget(panelSplitter);
        }
    
    }
    

    Timo

  • How to set the value of QUERY using PL/SQL process?

    Hello

    I use APEX 4.2...
    How to set the value of the REQUEST using process of PL/SQL which lies before the header - where the value of the REQUEST should appear on the URL?

    Kind regards
    Fateh

    You cannot set a value of demand in a PL/SQL block. You can run a PL/SQL block on a request which is the id of a button for example.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to set the field "default" of a quick dashboard to yesterday?

    Hello world

    I have a dashboard the guest on a date (full name Date.Date and type Date).
    I also have a simple report with two columns: Date.Date and a measure (whatever the name).

    I've managed to filter the day before the current date in the report by adding an advanced SQL filter:
    Date.Date = Cast (TimestampAdd(SQL_TSI_DAY,-1,@{system.currentTime}) as Date)

    Now, I would like to invite him to select the day before the current date by default.
    The filter on Date.Date would be "invited" or more.

    How to set the field "Default" from the command prompt?

    Thanks in advance

    Hello

    go to the command prompt...
    Select SQL results of as default: drop-down list.
    here... you have to write your SQL logic...
    who uses by default the previous date
    something like that...

    * Select case when 1 = 0 then anydate column of another timestampadd (sql_tsi_day-1, CURRENT_DATE) of the end SubjectArea name*.

    write like this... and report back...

    Thank you & best regards
    Kishore Guggilla

  • How to set the height width for an Image field in a web App?

    I have a webApp to save the image of user with description, title. But when I display all items pictures are great, I want to know how to set the height and width for images?

    Hello

    To do this properly, you need to resize the image. Prefably before you put it in British Colombia. While you can to scale the image in CSS, you don't want to do. Why? Because the images are still very large and probably not optimized properly for the web.

    This means that the page with these images will take a long time to load for people, and people will not be happy on the display of your site.

    You must use a software such as photoshop, if you or iphoto on a mac for example for editing, crop and size of the images before uploading. If you do everything you can use free web based tools such as this one:
    http://Pixlr.com/editor/

    You can also do in British Colombia itself in the file manager. If you click on the image you can see options to resize. The downside to this is's done it by pure mathematics. He doesn't know what is in the picture and the results can make the image etc. shrivelled.

  • How to set the line current

    Dear all,

    I have a panelFormLayout with some fields on this and there are other hidden required fields I want to put values in the button submit, I'm here links but I don't know how to set the current row programmatically.

    Thanks in advance.

    Hello

    You could do something like this:

    Binding DCIteratorBinding = ADFUtils.findIterator ("EmployeesView1Iterator");

    Line currentRow = binding.getCurrentRow ();

    currentRow.setAttribute (attrName, "attrValue");

    Concerning

    PS:

    public static DCIteratorBinding findIterator (String name) {}

    DCIteratorBinding iter =

    getDCBindingContainer () .findIteratorBinding (name);

    If (iter == null) {}

    throw new IteratorNotFound ("iterator '" + name + "' not found");

    }

    Return to iter;

    }

Maybe you are looking for