Fill column bound item with a select?

Hi,
I can't figure out how to do this, although I guess it's simple:
I have a column bound item (source=db column), the item is hidden, but I want to fill it with a default value when a record is inserted. The default value must come from a select.
I have tried it with a default value type plsql body and the "select something into :P11_Item_name from table" but that doesn't insert a value.
Any idea how to do this, except from creating a trigger on the table itself?
Thanks
Guido

Hi,
Well this is what I want to do:
I have an insert screen where a user can insert records.
Among other fields that the user needs to fill in, there is one field that needs to be filled with a value that comes from another table.
So this is the situation:
<user value>
<user value>
<select value from table>
And this altohether needs to be inserted as a new record into a table.
I think I can manage it by uncoupling the items from the database columns, and insert a record with a on submit computation.
But I have the idea that it can be done easier.
I guess it's often needed that a user inserts new records where one field comes from a select from another table?
In my example a user logs a request. This is inserted into a request table. But among the field the user enters for the request, a contact person has to be looked up (depending on the user's login) and stored into the request table as a column.
Maybe it's an idea to create a dummy item with it's source an sql query, and copy that item into the item with it's source <database column>??
I hope you get it, it's hard to explain.
Regards Guido

Similar Messages

  • Can only select items with direct selection tool

    I have been working on a design: one layer, with multiple groupings, nothing is locked. I'm trying to select the items with the selection tool, but can only select items with the direct selection tool (which is very inconvenient in this case). I can select the text with the text tool, but that really serves no purpose in my case. Anyone have any ideas as to what's going on? When I was working on it yesterday, everything was fine with all the tools. Thanks in advance.

    Imcookin,
    It may be a corruption of preferences, or an issue outside Illy.
    You may try to close down and just restart, or close down and restart pressing Ctrl+Alt+Shift/Cme+Option+Shift, or close down and use the suggestions in Move the folder or, if none of those suggestions help, have a look at the list in Other options

  • Fill in page items after a selection made from a pop up list

    Hi,
    I am using apex 3.1 with Oracle 10g database. I have an application where I need to fill in page items on a form after a user select something from a popup list. I have an email field which is a popup list on a foem page after a user select an email address I need to fill items on the same page like name, address.
    I foud this example on the web but it's not working for me. Any help would be appreciated.
    Thank you,
    sofia.
    *1. Create an Application Process On Demand - Set_Multi_Items:*
    DECLARE
    v_mgr    VARCHAR2 (200);
    v_job    VARCHAR2 (200);
    v_sal    VARCHAR2 (20);
    v_comm   VARCHAR2 (20);
    CURSOR cur_c
    IS
    SELECT mgr, job, sal, comm
    FROM emp
    WHERE empno = TO_NUMBER (v ('TEMPORARY_APPLICATION_ITEM'));
    BEGIN
    FOR c IN cur_c
    LOOP
    v_mgr := c.mgr;
    v_job := c.job;
    v_sal := c.sal;
    v_comm := c.comm;
    END LOOP;
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P106_MGR">'  || v_mgr  || '</item>');
    HTP.prn ('<item id="P106_JOB">'  || v_job  || '</item>');
    HTP.prn ('<item id="P106_SAL">'  || v_sal  || '</item>');
    HTP.prn ('<item id="P106_COMM">' || v_comm || '</item>');
    HTP.prn ('</body>');
    EXCEPTION
    WHEN OTHERS
    THEN
    OWA_UTIL.mime_header ('text/xml', FALSE);
    HTP.p ('Cache-Control: no-cache');
    HTP.p ('Pragma: no-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ('<body>');
    HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
    HTP.prn ('<item id="P106_MGR">' || SQLERRM || '</item>');
    HTP.prn ('</body>');
    END;
    *2. Create an application item - TEMPORARY_APPLICATION_ITEM*
    *3. Put the following in the Region Header of your items:*
    *<script language="JavaScript" type="text/javascript">*
    *<!--*
    *function pull_multi_value(pValue){*
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    *'APPLICATION_PROCESS=Set_Multi_Items',0);*
    *if(pValue){*
    get.add('TEMPORARY_APPLICATION_ITEM',pValue)
    *}else{*
    get.add('TEMPORARY_APPLICATION_ITEM','null')
    gReturn = get.get('XML');
    *if(gReturn){*
    var l_Count = gReturn.getElementsByTagName("item").length;
    *for(var i = 0;i<l_Count;i++){*
    *var l_Opt_Xml = gReturn.getElementsByTagName("item");*
    var l_ID = l_Opt_Xml.getAttribute('id');
    var l_El = html_GetElement(l_ID);
    *if(l_Opt_Xml.firstChild){*
    var l_Value = l_Opt_Xml.firstChild.nodeValue;
    *}else{*
    var l_Value = '';
    *if(l_El){*
    *if(l_El.tagName == 'INPUT'){*
    l_El.value = l_Value;
    *}else if(l_El.tagName == 'SPAN' &&*
    *l_El.className == 'grabber'){*
    l_El.parentNode.innerHTML = l_Value;
    l_El.parentNode.id = l_ID;
    *}else{*
    l_El.innerHTML = l_Value;
    get = null;
    *//-->*
    *</script>*
    *4. Put the following in the HTML Form Element Attributes of :P106_EMPLOYEES:*
    onchange="pull_multi_value(this.value)";

    Hi K,
    One way to achieve a result similar to what you are looking for is to use a combination of pop-up menu for the initial choice and a slider or stepper to make the second choice. The example below uses a slider. The formula would be the same for a stepper cell in column B of Main.
    Column A contains a series of pop-up menu cells with for choices: -- (no choice yet made), Red, Blue and Green.
    Column B contains a series of slider cells, each with the same values: Minimum: 0, Maximum: 3, Interval: 1.
    Each cell in Column C contains the formula below, which uses OFFSET, MATCH and the value set by the slider to retrieve the correct value from the Lookup table.
    Main::C2, and filled down: =IF(A="--","--",OFFSET(Lookup :: $A$1,B,MATCH(A,Lookup :: $1:$1,0)-1,1))
    Results for various combinations of the pop-up and slider cells are shown.
    Regards,
    Barry
    PS: Constructed in Numbers 2.3 (Numbers '09)

  • And another issue - using : column like :item in a select in a cursor

    i use column like :item frequently but now i'm thinking that it slows down the select making it run much more slowly . any suggestions or documentation I might use ? Do you think that it would be better to use column = :item or not to use :item at all ? Thanks a lot !

    Like in Select is used as
    WHERE col1 LIKE 'aaa%'
    and disable the index on col1 (Sure exists Index-Function)
    as it's better writing
    WHERE account_name LIKE 'CAPITAL%'in comparison to
    WHERE SUBSTR(account_name,1,7) = 'CAPITAL'Sure is better if you can use col1 = :item but I don't know your goal.
    Regards

  • How to update a bound textField with user selection ?

    Hi all,
    I'm following an Update Database example from the JSC tutorials and have the following situation.
    I have a page displaying a row of data for a selected person (first_name, last_name, title) bound to a data provider. I have made the "title' field a TextField. I want to enable the user to edit the title field and update the information in the database.
    If I simply type a new title on the text field and click on Update, everything works fine. However, I want to make the user choose from a list of titles (in a drop down list) instead of manually editting the 'title
    field to avoid spelling errors.
    However, the textfield (title) does not display the selection from the Drop Down list.
    titleField.setText(rankdropDown.getSelected());
    It seems to me that the reason is that each time the drop down event value change event handler is executed, the Pre-render methd kicks in and restores the 'title' field to its original value (from table rowset). And the user selection is not displayed.
    public void prerender() {
    try {
    getSessionBean1().getStudent_infoRowSet1().setObject(1, getSessionBean1().getLoginBean().getUsername());
    student_infoDataProvider1.refresh();
    } catch (Exception e) {
    Can someone please suggest a solution?
    Thanks.
    Nakul

    Are you submitting the page after selecting the data from the drop down?
    The drop down does not seem to have an option of submiting the page when the value is changed. Only if you submit the page, will the data be processed and the text field updated.
    From what i see in the doc for the prerender method, this method is invoked during the renderResponse phase. Whereas the value change event is processed during the process validation phase itself of the jsf life cycle.

  • How to create a multi column list item and select these values from a LOV

    Hi all,
    My requirements are:
    1) create an LOV which holds the productno, productname and productprice fields (this is working)
    2) at run time, select one record from LOV and populate the list/grid with this selected record values of productno, productname and productprice fields, so we are showing them on the form in the form of a table/grid (not working)
    3) be able to select multiple records from LOV and be able to populate the list item with multiple records (not working)
    4) have two more columns in the list/grid, for productquatity and total price (not wokring)
    Please help me.
    how can i create this grid or list in oracle
    whats the possible way of acheiving this in oracle

    If you use a list item to display multiple columns then you'll need to use a fixed-width font. You can achieve a similar look with proportional fonts by using a normal block and setting the fields' bevel to 'None'.
    Each column in the LOV has a Return Item property (under Column Mapping Properties). Set this to a :block.item reference for each column to bring the data back into those referenced fields.
    You can't select multiple records from an LOV. For this you will need to create your own form. Check the help for system.mouse_button_modifiers to see how to respond to Ctrl+click and Shift+click.
    To add columns just modify the LOV's record group's query.

  • Connected webpart - add item with selected data

    Hi!
    I have a page with connected web parts.
    Example:
    List one: Companies
    a address List with companies
    List two: Employees
    A list with employees and a relation to companies (Company name).
    On the view item on companies i have list Employees connected. When i add an item i would like to have the Company name selected in the drop down.
    I have seen examples on using JavaScript but this doesn´t work in SharePoint 2013. Anyone with a solution for this, Jslink perhaps?

    Hi,
    According to your post, my understanding is that you wanted to add item with selected data in connected webpart.
    I recommend to use lookup column in the Employees to add a relation to companies.
    You can check “Yes” under “Require that this column contains information”. Then you need to select an company when you add a item.
    The result is as below:
    If you want to set the defult value for the lookup column, you can use InfoPath and no code.
    For more information, please refer to:
    SharePoint 2010 - Set default value for a lookup column using InfoPath and no code
    In addition, a simple add-on(SharePoint Default Value Add-On) which inject a "default value" section into "Create Column" dialog, seems to be a solution.
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • BUG?: Paginate Doesn't Work with Page Item with Source as Database Column

    CREATE TABLE T_PARENT
      ID NUMBER NOT NULL
    , STAFFID VARCHAR2(20)
    , CONSTRAINT PARENT_PK PRIMARY KEY
        ID
      ENABLE
    insert into T_parent values (1, '77258317');
    commit;
    create table T_child as
    select
      rownum id
    , '77258317' staffid
    , dbms_random.string('U', 5) aa
    , dbms_random.string('U', 15) ab
    , dbms_random.string('U', 3) ac
    from dual
    connect by level <= 100;
    /Form page for T_PARENT.
    Classic report:
    select id, aa, ab, ac
    from t_child
    where staffid = :Px_STAFFIDTry and paginate = no data found.
    However, if you first submit the page, then paginate, it works as expected.
    Reproduced:
    http://apex.oracle.com/pls/apex/f?p=54920:57:106342795192226::::P57_ID:1
    If I for e.g. use an item with static assignment, it works fine.
    Cheers,
    Trent
    Edited by: trent on Apr 19, 2013 11:59 AM
    Also, it works fine when you reference the PK column.

    Just like with the paginate, the problem may also happens when you change the sort column or direction by clicking on the header.
    If the item in the WHERE clause was being set fromt he URL this wouldn't be an issue because it would be saved on the Persisten Session state.
    Regarding session state, there are two kinds Temporary or in memory and Persistent. When the page is rendering the item values are only on the Temporary session state. This is why the report renders correctly on page load.
    The item value won't go to Persistent session state until the page is submitted. Item values also go to Persistent session when they are passed in the URL, or explicitly set with a computation, etc..
    The Session state Dialog can only show the Persisten session state which is saved in DB tables. It's unable to show you the values during page render. For that you need other mechanisms like debug messages.
    I think that when you set page item as SQL query and Only when current value session state is null the value must be saved to Persistent session state. If you can examine the value with the Session Dialog then that would confirm that.
    Hope this helps.
    Thanks
    -Jorge

  • Can't select multiple items with shift key os 10.7

    I can use command A to select all, and I can select multiple items with command and individually clicking each one, but not using Shift and clicking on the first and last items.  Any ideas?

    You need to display the window in column or list view. Shift-clicking items won't do that in icon view.
    (64793)

  • How to reference Item with Table Column

    Hi Community,
    we want to reference Table Column with an Item. This Item is a Select-List wich includes a Date. Befor doing something, you have to select this date. After that we want to create a new row in with a date-column. This date should be the same as in this Item. We are using a tool which is called HTML-DB. We reached that there is shown the date, but there is no value. It is an updateable report row.
    How can we copy this value from the Item in this new column?
    I am sorry for my english, but I hope everyone understands our problem.
    Greez Rob

    I did it another way. We are using an old HTML DB version (v1.6). And I think it is a bug to reference a date with a column. I have this opinion because we copied the table but we changed the format. we are using varchar instead of date, and it is working without problems.
    We also tried &px_name and it didn't work.
    Thx anyway!

  • How to fill column value of a matrix with specific color when there is no value in that specific cell?

    Hi All,
    I need to create a 5/5  matrix in SSRS report. The data will be :
    Col_Side   Col_Header   Col_data
    1                  1                1
    1                  1                 1
    1                  2                1
    1                  5                1
    1                  5                1
    1                  5                1
    2                  3                1
    2                  5                1
    3                  1                2
    3                  1                2
    3                  1                2
    4                   2               1
    4                   4               1
    5                   1               1
    5                   1               1
    5                   5               1
    So, the matrix column will be Col_Header and matrix row will be Col_Side and count(Col_data) will be on the data.
    Finally, it will create a 5 by 5 matrix with Count(Col_data) as its data for each combinations. If there is no combination (for ex: in the above data we do not have no combination of (1,3) , (1,4) , (2,1) etc..) then the matrix will be filling that corresponding
    cell with zero.
    Here I need to fill the cells with some colors based on some criteria.
    I need to fill (5,3), (5,4), (5,5) combination with "Red" color.  Like this , I need to give different colors in each of the cells. Here, (5,5) combination will be having 1 in its cell.  (5,4) and (5,3) will be having zero in its corresponding
    cells. I 'm trying to fill all the 3 cells with "Red" color. But, I am able to fill only (5,5) with "Red" color. Since the other 2 cells (5,3) and (5,4), has zero in their cells, it will not fill the cells with "Red" color. 
    How can I fill those two cells (5,3) and (5,4) with red color?
    I know this is very vague. I have no option to give the picture here..
    Please suggest

    Hi Julie,
    According to your description, there is a 5/5 matrix with three fields: Col_Side, Col_Header, Col_data. You drag Col_Side field to Rows, Col_Header to Columns and Col_data to Data, then filling blank cells with zero using expression. Now you want to fill 
    (5,3), (5,4), (5,5) cells with red color using expression, but it has no effect on cells (5,3) and (5,4).
    According to my test, the expression has on effect on cells (5,3) and (5,4) since there is no corresponding data and the cells are blank. As a workaround, we can insert data for cells (5,3) and (5,4) in dataset, then use expression by following steps:
    In the dataset, insert two sets of data (5,3,0), (5,4,0).
    Right-click the cell of data, click Text Box Properties.
    Click Fill in left pane, click (fx) button, then type the expression like below, then click OK.
    =iif(Fields!Col_Side.Value=5 and Fields!Col_Header.Value >=3 ,"red","white" )
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • Notification or Alert when selecting Item with charge on Sales Order???

    Hello,
    Is it possible to make an notification / alert on a salesorder when entering a item with batch/charge???
    Now everytime the customer must enter CTRL-TAB on amount field to select a batch but don't get a reminder for the batch.
    They don't want to select the batch/charge on Delivery.
    THX
    Mark

    Below is code that will prevent deletion of a line from Sales Order.
    DECLARE @NoOfRows int
    DECLARE @MaxLineNum int
    DECLARE @UserId int
    IF (@transaction_type = 'A' or @transaction_type = 'U') AND @object_type = '17'
    BEGIN
    select @NoOfRows = COUNT(*) from RDR1 where DocEntry = @list_of_cols_val_tab_del
    select @MaxLineNum = MAX(LineNum) from RDR1 where DocEntry = @list_of_cols_val_tab_del
    select @UserId = UserSign2 from ORDR where DocEntry = @list_of_cols_val_tab_del
    IF(@NoOfRows <> (@MaxLineNum + 1) AND @UserId IN (10,11))
    BEGIN
    select @error = 1234
    select @error_message = 'One or more lines have been deleted from the Sales Order'
    END
    END
    You can say which users cannot modify Sales Orders like by modifying the @UserId IN (10,11) below. You need to get the User ID from the OUSR table.
    IF(@NoOfRows <> (@MaxLineNum + 1) AND @UserId IN (10,11))
    Hope this helps
    Krishnan

  • Pre populate an item with source type="Database Column"

    Hello gurus,
    How can I pre populate an item with source used "Always, replacing any..." and source type="Database Column"?
    I have a form that creates/updates rows in a table and when creating a new row I want to populate some of the fields based on some parameters from the previous page. How can I achieve this?
    I tried adding a conditional process when PK is null and populate the expected fields, but in the browser they are not shown with those values, even if I look into the session I can see that they have the values assigned in the process ?!?!?!
    Thanks in advance,
    Florin

    Florin,
    Use the Default Value item attribute. In you case, set the Default Value Type to Static Text with Session State Substitutions and enter your item using the &P1_ITEM_NAME. syntax in the Default value text box.
    Thanks,
    - Scott -

  • Problems with the selected item in a JList

    Hi,
    I am using a JList with a JTextPane as renderer, when I select an item in the list the foreground color is black instead of being white and when I go up in the list the foreground color of the items under the selected one is white (they are not visible anymore).
    Does anyone know why this list behaves like that and what I should do to prevent this?
    Thanks in advance
    Here's the code of the renderer (I suppose this is the place where the problems are):
    public class TextPaneListRenderer extends JTextPane implements ListCellRenderer
    public TextPaneListRenderer()
    setOpaque(true);
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
    this.setText(value.toString());
    if (cellHasFocus)
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
    else
    setBackground(list.getBackground());
    setForeground(list.getForeground());
    return this;
    getListCellRendererComponent() not yet implemented.");
    }

    Hi,
    i would use isSelected:
    if (isSelected)
    setBackground(list.getSelectionBackground());
    setForeground(list.getSelectionForeground());
    else
    setBackground(list.getBackground());
    setForeground(list.getForeground());
    It might help, just give it a try.

  • I CAN SELECT A ITEM WITH TRACK PAD, But can not open the item

    Mac Book 15 inch
    OS X 10.10
    New to Mac
    Using track pad I can select an item by one click but can not open this item with 2 clicks.

    Go to System Preferences>Track pad and check the Secondary Click settings

Maybe you are looking for

  • I am unable to change my font from Helvetica.  I would  like to use "Calibri" 12 when I send an email.

    I  am unable to change my font from Helvetica mail.  I would like to compose an email in Calibri 12.  Is it available.? 

  • IDVD 5 unexpectely quits!!

    Since I upgraded to IDVD 5 and also updated to last Apple update, I face many problems using Idvd. When I try to use Idvd through imovie the idvd quits! when I try to use the new feature of doing a dvd movie direcly from my camera it quits again! wha

  • MSI GX620 Tv-tuner

    Hi! Now I bought MSI GX620-063 notebook.I tried to install the tv-tuner,but I couldn't do it.I found the Tv-tuner antenna interface in the notebook...I read the instructions,this is optional....Does any Tv-tuner belong to the notebook or not? Thanks

  • Installing 5.0.1 updating 5.0, I received a dialog box that said my Profile was missing. Wht do I do now?

    I have an iMac, operating OS 10.6.8. I have using Firefox for years, most recently updated to 5.o. Tonight as I worked, a dialog box appeared saying I could upgrade to Firefox 5.0.1. I said the equivalent of OK, and it appeared that the installation

  • Transmitting text in IDoc

    Hello, I have a scenario wherein I have text object (like sales text in Material master) attached to an IDoc. I want to transfer text that the user enters (within SAP) via IDoc to XI. XI then need to call a webservice and post this text information t