Update a text field based on a SelectOneChoice field

Hi,
I have a set of Create, Confirm and Thankyou screens. These screens are bound to a global view object. The create screen has a SelectOneChoice element which allows the user to pick an employee. When the selection is made, I need to display the employee's department in a read only text field below the dropdown. The Employees list(SelectOneChoice) is associated to the read only view object and this view object also has the employee's department information. Im dont know how to set the department name in the text field and refresh the screen. Any help is appreciated. Thank You.

Frank, thanks for you time. Please see my answers below.
Hi,
can you help me creating a reproducable testcase
based on the HR schema where we have a Departments
and Employees tables. To understand your usecase I
have some questions:
Im not too familiar with HR Schema.
>
First of all however, what is a "global view object",
and is it safe to assume you are using ADF Business
Components?
Its the "Globals View Object" as described in the SRDemo for creating a new Service Request and yes I am using ADF Business Components.
>
Which version of Oracle JDeveloper do you use ?
10.1.3
>
The usecase I understand is that you have a
selectOneChoiceList that whenever you select a new
name should update a read-only text field with the
department name. Is this correct ? Or is there more
in it ?
Heres the complete description. There are 4 fields on the screen
1. Program Name (text input field, - required field)
2. Program Category (SelectOneChoice field - required field)
3. Employee Name (SelectOneChoice field - required field)
4. Employee Department (Text output field - based on 3 above)
What you have described above is working for me now, but everytime I select a value for 3, it does the required fields check and gives a message like "1 & 2 are required and a value must be entered", this validation should only occur when my continue button is clicked.
>
The department name should be displayed only (read
only), or is it also bound to what you call "global
view"?
Yes its read only but I need to bind to the Globals view as I need to display it in the confirmation screen.
>
Also, just to be sure, is the department name part of
the VO or is it the departmentId?
The screen is bound to the Globals View, the selectOneChoice values are displayed from another view(EmployeeList view) which has the department name.
>
Frank

Similar Messages

  • Using external XML document to update / change text fields inside of published captivate output.

    Hello
    I currently have a project where the client has requested to have the ability to update the text fields inside the project at a later date.
    This is due to the nature of the content changing rather rapidly, i would like to set this up so the client can manage this them selfs.
    What would the best way to do this be?
    I'm thinking XML, an external XML sheet were by Captivate imports the text from this XML sheet and then displays it within the specific text fields contained within the captivate output.
    This way the client would just update the external XML document(cut and paste the text in) and then the text would be dynamically updated in the published Captivate document.
    any help would be amazing !
    Thanks in advance
    Nick

    Hi Lieve
    But isn't this thread more about an end user having an ability to change text after the Captivate has been published and delivered? I could see where that might be useful if making changes then publishing to create a new output. But I'm interpreting that the situation here is that a Captivate project has been published and delivered, and some mechanism is desired that allows the recipient to modify an external XML file to influence changes in the already compiled Captivate output.
    Cheers... Rick

  • Updating a text field in  aform based on conditions

    Hi ,
    We are developing a custom form which has a database datablocks.
    This form is a master detail form . It has a field called "status" whose initial values is 'Draft' and this field is present in the master part of the form.
    The Logic for "Draft" is written in Pre-Insert trigger of the header block.
    Question
    If condition "A" is met and "B" is met , status should be set as a value called as 'Submitted';
    If condition a is not met and B is met , status should be set as a value called as 'Created';
    We are doing this in the post-update trigger at block level. But the changes are not taking effect.
    Please let us know if this is the correct approach to handle the column. Note that the column "Status" is a database column.
    Thanks and Regards
    SR

    The above is not working
    Let me restate the problem statement
    Hi ,
    We are developing a custom form which has a database datablocks. This form is a master detail form . It has a field called "status" whose initial values is 'Draft' and this field is present in the master part of the form.
    The Logic for "Draft" is written in Pre-Insert trigger of the header block.
    Question
    The record is created with a status of Draft initially.
    Query and requery back and if condition is met , the value of status should be updated as follows......Condition A and B involves going an chekcing in some other table and based on that , we set the status column....
    If condition "A" is met and "B" is not met , status should be set as a value called as 'Submitted';
    If condition "A" is not met and B is met , status should be set as a value called as 'Created';
    We are doing this in the post-update trigger at block level. But the changes are not taking effect.
    Please let us know if this is the correct approach to handle the column. Note that the column "Status" is a database column.
    Also tried the following
    1) When validate item at block level by capturing the item in a parameter and then assigning the parameter to the status column in pre-update column . This is not working
    Thanks and Regards
    SR
    ----------------------------------

  • Using a Document Listener to update a text field

    Hi,
    Background:
    I need to retrieve a number from a card using a hand scanner. I'm currently using a jTextField1 in Netbeans to do this. When the number is input (the format is 6 digits, i.e. 123456) the rest of the form fields are filled in and updated automatically from an oracle database as it should. I have the database being checked as soon as the field reaches 6 characters (doc.getLength() == 6), It all works great.
    Problem:
    The problem comes in when I need to input a card that has a newer, different format of numbers and characters, i.e. **001234567**, it's more than 6 characters. I need only the 123456 substring to update the form, and the 7 substring to input later.
    What I tried:
    I'm using the combination of pattern matching and substring to get the 1234567 part only. I thought of using a hidden field on the form to input the numbers to and then set the text of jTextField1. I'm not sure this would work and seems like a hack anyways.
    Code:
            public void updateLog(DocumentEvent e, String action) {
            Document doc = (Document) e.getDocument();
            Integer docLength = doc.getLength();
            String isCardLegal = jTextField1.getText(); // getting card from textbox
            returnString Del = new returnString();
            String str = Del.getNewNumberFromCard(isCardLegal);
            System.out.println("str: "  +str);
            if (docLength == 6) {
              // see if number exists in database here
    public class returnString {
        public String getNewNumberFromCard(String oldString) {
            Pattern p = Pattern.compile("\\*");
            Matcher m = p.matcher(oldString);
            String newString = m.replaceAll("");
            // takes off leading zeros when using a new card
            // otherwise just returns the string as-is
            if (newString.length() == 9) {
                newString = newString.substring(2);
                return newString;
            } else {
                return newString;
    }Does anyone have a better way to do this? I hope I was clear in my explanation.
    Thank You for your help,
    Alan
    Edited by: shadow_coder on Oct 8, 2009 12:01 PM

    I really thank you for your help, I realize I wasn't clear because I wasn't sure about too many different things. I'll try it again:
    I need to use a hand scanner to input id cards having 2 different character sets. I now realize I can have the scanner insert a carriage return at the end of the scan, so I need to be able to detect this carriage return. I'm using a documentlistener to look at each character in the textfield. The character sets I need to use are 6 characters long, and an 11 character long set (including asterisks).
    Here is my SSCCE:
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    public class exampleCase extends JFrame implements ActionListener {
        JTextField textField1;
        public exampleCase() {
            getContentPane().setLayout(new FlowLayout());
            textField1 = new JTextField(15);
            textField1.getDocument().addDocumentListener(new MyDocumentListener());
            textField1.getDocument().putProperty("name", "TextField");
            getContentPane().add(textField1);
            setSize(300, 170);
            setVisible(true);
        public static void main(String argv[]) {
            new exampleCase();
        public void actionPerformed(ActionEvent e) {
            throw new UnsupportedOperationException("Not supported yet.");
        class MyDocumentListener implements DocumentListener {
            public void insertUpdate(DocumentEvent e) {
                updateLog(e, "inserted into ");
            public void removeUpdate(DocumentEvent e) {
                updateLog(e, "removed from ");
            public void changedUpdate(DocumentEvent e) {
                throw new UnsupportedOperationException("Not supported yet.");
            public void updateLog(DocumentEvent e, String action) {
                String newline = "\n";
                Document doc = (Document) e.getDocument();
                int changeLength = e.getLength();
                System.out.println(
                        changeLength  +" character"+
                        ((changeLength == 1) ? " " : "s ")
                        action+  doc.getProperty("name")  +"."+  newline
                        "  Text length = "+  doc.getLength()  +newline);
               try {
                    String docCharacters = doc.getText(0, 2); // Exception when increased
                    System.out.println("Characters are: "+  docCharacters);
                    if (docCharacters.equals("\\r")) { // How to check for carriage return?
                        System.out.println("I'm Here, Yeeaaah!!");
                } catch (BadLocationException ex) {
                   System.out.println("Error Here, bad location" + ex);
    }When I increase the '2' to be able to handle the characters, I get javax.swing.text.BadLocationException: Invalid location can anyone tell me why? I'm not sure why it works when the number is at 2 but not others!
    The other issue is, what is the correct way to detect a carriage return? I was able to test this when the number above was at 2. This doesn't work.

  • Script To Update Month Text Field?

    Hello SharePoint Fam,
    I am wanting to add a choice field to existing list that contains each month(jan,feb,mar,etc) but was wondering is it possible for me to automate this at all so I don't have to manually change default month value to correct month on the first of each month.
     Basically want the field to be hidden and index it so that I can make a easy filter option for a very big list(60k items) and want it totally invisible to users so all they have to do is load there files and have no idea that a month is being tagged
    to there files.
    Thanks N Advance

    You can use an event receiver (ItemAdded/ItemUpdated) to populate the month field based on any condition (like created date, modified date etc). Or you can also create a Calculated field like (MONTH([Created]).
    Moreover, the field can be set so that it is not visible in forms like NewForm, EditForm, or DisplayForm. Example of setting the field in forms
    SPField.ShowInNewForm = false;
    SPField.ShowInEditForm = false;
    SPField.ShowInDisplayForm = false;
    Blog | SharePoint Learnings CodePlex Tools |
    Export Version History To Excel |
    Autocomplete Lookup Field

  • Auto update of text field on drop down change (binded to XML doc)

    Hi all,
    I have a problem that i'm stuck with since too long and I'll be really grateful for any useful idea.
    Here is my issue:
    I have this XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ItemsList>
              <Product>
                        <itemUnitPrice>200.00000000</itemUnitPrice>
                        <itemCode>lkg</itemCode>
                        <ItemID>2</ItemID>
                        <itemDescription>lk desc</itemDescription>
              </Product>
              <Product>
                        <itemUnitPrice>300.00000000</itemUnitPrice>
                        <itemCode>lkv</itemCode>
                        <ItemID>1</ItemID>
                        <itemDescription>lkv desc</itemDescription>
              </Product>
              <Product>
                        <itemUnitPrice>400.00000000</itemUnitPrice>
                        <itemCode>lks</itemCode>
                        <ItemID>3</ItemID>
                        <itemDescription>lks desc</itemDescription>
              </Product>
    </ItemsList>
    ItemID and itemCode are bounded to my dd list and the left is bounded to the rest of the columns in my table (below).
    I`d like to find a way to auto change, for example the unit price, of an item selected from the list.
    I have to mention that this xml is returned by a database and data can change so  i can`t write javascript static code to match itemId with their Unitprice and description.
    Any ideas ??
    Thanks in advance.

    Hi,
    yes this is possible.
    Add this script to the change event of your dropw down list.
    Text1.value.text.value = xfa.event.change;

  • Ability to update a custom text field across multiple projects in a grid type view

    We have a project level custom field for the Project Owner to enter an Executive Level project status.  A project owner will have many projects. Right now the owner has to open each project individually, update the text field and save which can
    take a considerable amount of time. We would like to have the ability to have the project list with the text field in a grid (looks like an excel sheet) with the ability to update the text field directly from the grid.  Is there some way
    to do this?

    Hi,
    Which project version are you using?
    Anyway there is no "excel-like" way to bulk edit proejct field, such as you can do for the resources. The project center is unfortunately a read-only view.
    For PS2010, the
    bulk edit tool allows you bulk editing pronot be "excel-like" meaning updating the value in rows. You'll have to select the project with the same value for the custom field and enter the value once and validate and redo this process for each proejct field
    value.
    Otherwise third-party tools are available on the market for this purpose:
    http://www.senseiprojectsolutions.com/sensei-bulk-update/
    http://www.fluentpro.com/productsfluentbooks2013.html
    Finally you could develop a side-application to achieve this objective.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Duplicate a Text Field on Every Page of a Document?

    Today I wrote my first vb.net/adobe app.  I managed to open the pdf doc in adobe and create a named text field.  I managed to insert a java script that gets the current date when the document is open and updates the text field.  I would like to duplicate the text field on all pages of the document.  Manually, I can right click on a text field and select duplicate.  I don't see a property or method that allows me to program this.  The field property "page" appears to be read only.  any help would be appreciated.  thanks.
    page
    The page number or an array of page numbers of a field. If the field has only one appearance in the document, the page property returns an integer representing the 0-based page number of the page on which the field appears. If the field has multiple appearances, it returns an array of integers, each member of which is a 0-based page number of an appearance of the field. The order in which the page numbers appear in the array is determined by the order in which the individual widgets of this field were created (and is unaffected by tab-order). If an appearance of the field is on a hidden template page, page returns a value of -1 for that appearance.
    TypeInteger | ArrayAccessRFieldsallExample 1Determine whether a particular field appears on one page, or more than one page.var f = this.getField("myField");
    if (typeof f.page == "number")
    console.println("This field only occurs once on page " + f.page);
    else
    console.println("This field occurs " + f.page.length + " times);

    I also tried the brute force method of moving from page to page and creating a text field on each page.   I used pageNum to changes the page, but, adobe didn't seem to recognize that.  I saw the page change on the screen, but, all of the textfields were created on the first page!

  • Line item text field from MIGO are not copied into FI line item text field

    Hi all on SCN, please, I need a help.
    It was created as required by the user a field status group with the text field required.
    This field status group was assigned to some accounts, in order to make my unit tests.
    u2003
    In development envirionment was made some tests directly in FI area, and it works properly.
    u2003
    But the user made a test using MIGO transaction, choosing in this transaction an account that he changed its field status variant to the one created in development environment, that make the text fiels required. So, to start, he donu2019t fill the text item of MIGO, and a message error appear stating that he needs to enter values in this field.
    After fill in the text fiels, he can save his work.
    u2003
    But the FI document generated donu2019t receive the line item text typed in MIGO, but receives the values on Reference document and Document Header text entered in the header of MIGO, what is missing, donu2019t is automatically copied MIGO text line items to FI documents line Items, does there is some additional configuration missing?
    Hope someone help me with this issues.
    Thanks in advanced!

    Hi,
    Material document will get updated in reference field in FI by default.  If for any reason, want to get this updated in text field, you need to define a subsititution in GGB1.
    Best Regards,
    Madhu

  • Item level Info record PO text field in Purchase Order Me21n transaction

    Hello All,
    I have to enter some information in the PO info record text field (which is in Item level Texts tab of ME21n transaction ) using an user-exit at the time of creation/change of purchase Order.
    Does anyone knows the user-exit and how to update the text field ?
    Any help is really appreciated
    Thanks
    Ricky

    Check with : Enhancement : MM06E005
    Function module : EXIT_SAPMM06E_017
    This user exit will trigger when you enter the data in item level(Both creation and change)

  • Common text field for several symbols's mouseover

    Hi all.
    I have on stage several symbols and a simple text element.
    I want the text element to display every symbol's mouseover specific text. For ex. if I mouseover "Symbol_1" the text element should display something like "Your mouse cursor is hovering Symbol_1".
    How's the code for this?
    Thanx.
    pmfr

    Hi, pmfr01-
    You'll need to have a mouseover event defined for each symbol instance or an element within a symbol definition.  In that mouseover event, you would update the text field by referring to it this way:
    sym.getComposition().getStage().$("Text1").html("Your mouse cursor is hovering over mySym1");
    Hope that helps get you started!
    -Elaine

  • BAPI - Modify Text Field BSEG

    ¿Does anybody knows a BAPI to modify some text fields in the BSEG table? We want to update a text field in a custom program for a specific document number.
    Thanks in advance.
    Fernando.

    Check with Enhancement LMR1M001
    Exits :
    EXIT_SAPLMRMP_010              Customer Exit: Analyze Document Header
    EXIT_SAPLMR1M_003              Customer Exit: Pass On Document Header

  • Refresh text field

    hey,
    I've an active output text component which should be updated as the data is changed in the database. I've already tried af:poll but it creates a problem when used in the template.
    I've seen some descriptions on active data services which I think would a solution to this problem. but I couldn't find any example as to how this could be done.
    So how can I use active data services to update the text field value when the changes are made in the db or can anyone guide me to an example?
    thanks

    Hi,
    See if the following link on Active Data Services helps:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adv_ads.htm
    Sireesha

  • Update text fields with xml data based on DDL selection of an ID number

    Hi guys,
    this one should be straight forward, but I cant seem to find a straight forward answer.  In a nutshell:
    XML file contains ID, Name, Location (so far 3 records in sample xml file)
    Form contains a Dynamic Drop down list to allow selection of ID and text fields to display the associated name and location of that ID.  The binding of the Drop down works fine, however I need the other fields to update to the associated name and location when different ID's are selected.  I assume I'll need some sort of exit event on the drop down list to update the other fields with the Name and location of the ID selected, but I dont know enough to have a stab at it.
    please, please, please help, Im starting to pull my hair out.
    James.

    Hi James,
    This would depend on the structure of your XML but assuming you have something like;
    <Data>
                <Item>
                            <Id>1</Id>
                            <Name>Name1</Name>
                            <Location>Location1</Location>
                </Item>
                <Item>
                            <Id>2</Id>
                            <Name>Name2</Name>
                            <Location>Location2</Location>
                </Item>
                <Item>
                            <Id>3</Id>
                            <Name>Name3</Name>
                            <Location>Location3</Location>
                </Item>
    </Data>
    Then in the change event of your dropdown (your could use the exit event but then value might not have changed so would be performing unnecessary processing) add the following code.
    var itemGroup = $data.Data.resolveNode("Item.(Id.value === '"+xfa.event.change+"')");
    Name.rawValue = itemGroup.Name.value;
    Location.rawValue = itemGroup.Location.value;
    The xfa.event.change will be the value selected, the resolveNode will return the Item with the matching Id, and then it is just a matter of assigning it to your form fields.
    Hope this gets you started.
    Regards
    Bruce

  • Updating a user text field in sap system form in Find Mode

    Dear All,
                    I created a Edit text field in Sap System form [FormType :149] -Sales Quotation. I want to update a value to the text while clicking OK button in Find Mode. the code is given below.
    If pVal.ItemUID = "1" And pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE And (Not pVal.Before_Action) And pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
            oForm = SBO_App.Forms.Item(FormUID)
            oForm.Freeze(True)
            oItem = oForm.Items.Item("txtUID") 
            oEdit = oItem.Specific
            oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
            oItem = oForm.Items.Item("txtCampgn")         ' //  User created field
            oItem.Enabled = False
            oEdit = oItem.Specific
            If oRS.EOF = False Then
                oEdit.Value = oRS.Fields("CMNAME").Value
            Else
                oEdit.Value = ""
            End If
    end if
    while clicking the OK button, Based on the value fetched on the screen, I have to open a recordset and get the value.  But, the screen loads the value to the system textboxes. I could not get those value to run the Sql  in the event. it returns empty. Could any one help please how to solve this ?
    Thanks in advance.
    Manikandan.

    Hi,
    Try This..
    If pVal.FormType = 149 And pVal.ItemUID = "1" Then
                If pVal.FormMode = SAPbouiCOM.BoFormMode.fm_FIND_MODE Then
                    If pVal.Before_Action = False Then
                        If pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED Then
                            Try
                                oForm = SBO_App.Forms.Item(FormUID)
                                oForm.Freeze(True)
                                oItem = oForm.Items.Item("txtUID")
                                oEdit = oItem.Specific
                                oRS = ConSBOdb.Execute("Select * from BG_CAMPAIGNSHDR where CMIDENT ='" & Trim(oEdit.Value) & "'")
                                oItem = oForm.Items.Item("txtCampgn") ' // User created field
                                oItem.Enabled = False
                                oEdit = oItem.Specific
                                If oRS.EOF = False Then
                                    oEdit.Value = oRS.Fields("CMNAME").Value
                                Else
                                    oEdit.Value = ""
                                End If
                            Catch ex As Exception
                                SBO_application.MessageBox(ex.Message)
                            End Try
                        End If
                    End If
                End If
            End If
    Best Regards,
    Mahendra

Maybe you are looking for

  • Can't use the iPod on more than one computer!!!!!!!

    Ok, This has got me so frustrated! We got an iPod and installed iTunes. We thought we had it figured out - we purchased music from iTunes, played it on the iPod and everything was great. Then plugged the iPod into my other computer to listen to our m

  • Why is my recent purchase not showing up in my purchase history?

    I made a purchase and the parcel was shipped to me by UPS. I got confirmation that it is delivered to some dock in KY. I called the seller and they said it was shipped to eBay's secondary shipping area and it will be forwarded on to me (in Canada)...

  • Pages 4.2 no Small Caps can be activated

    I use a lot Pages for texts, flyers and posters. There seems to be a serious bug within Pages 4.2. if you open the typo panel and activate the Small Caps feature or Opentype fonts they though they can be clicked Pages does not transform the marked te

  • I think that I found a bug in the new iTunes 8.0 PC

    I don't know if this is a bug or not, but has anyone notice that when you click on an item "link" in iTunes and if your mouse pointer remains on the link that you just click on, that the page will not move to the link until you move your pointer off

  • Sales Order - Prevent user from creating more that one schedule line

    Hello, Is it possible to prevent users from adding lines (rows) in the schedule line tab of VA01/VA02 ? Our requirement is that one item will have one only schedule line, the quantity cannot be split into different dates. Regards, Joã