Populate list from recordset on Parent/Child form

We have a parent/child form and want to populate several lists from recordsets. We can populate the child canvas by calling a procedure from the WHEN NEW FORM INSTANCE trigger but the same code fails when trying to populate a list on the Parent canvas. If I move the code to a PRE-BLOCK trigger on the parent block, then it works. I just kept moving the code until I found something that works. Can anyone tell me why it wouldn't work from the WHEN NEW FORM INSTANCE trigger? Is PRE-BLOCK the correct place?

WHEN-NEW-FORM-INSTANCE trigger
Add_Orgs_Lists('HR_PERSONS.OFFICE_SYMBOL');
PROGRAM UNIT
PROCEDURE Add_Orgs_Lists (list_name VARCHAR2) is list_id ITEM;
     col_name VARCHAR2(80) := SUBSTR(list_name, INSTR(list_name, '.')+1);
     sql_stat VARCHAR2(2000);
     BEGIN
     --Find ID for list item.
          list_id := FIND_ITEM(list_name);
          IF ID_NULL(list_ID) THEN
               MESSAGE('List Item ' ||list_name|| ' does not exist.');
               RAISE FORM_TRIGGER_FAILURE;
          END IF;
     --Build the SQL statement.
     --     message('In Get_Org');
     sql_stat := 'SELECT Distinct Org_Name, Org_Name FROM HR_Organizations
     ORDER BY 1 ASC';
     Populate_the_List(list_id, sql_stat);
          EXCEPTION
               WHEN OTHERS THEN
                    MESSAGE('Internal error occurred in Add_Orgs_List.');
                    RAISE FORM_TRIGGER_FAILURE;
END Add_Orgs_Lists;
PROCEDURE Populate_the_List (list_id ITEM,
                                                       sql_stat VARCHAR2) is
     group_id RecordGroup;
     outcome NUMBER;
     --List_Elements  VARCHAR2(40);
BEGIN
          --message('In Populate_the...');     
--Create temporary record group.
group_id := CREATE_GROUP_FROM_QUERY('List_Elements', sql_stat);
IF ID_NULL(group_id) THEN
     MESSAGE('Record Group could not be created in Populate_the_List.');
     RAISE FORM_TRIGGER_FAILURE;
END IF;
--Populate record group.
     outcome := POPULATE_GROUP(group_id);
     IF outcome <> 0 THEN
          MESSAGE('Record Group could not be populated in Populate_the_List.');
          RAISE FORM_TRIGGER_FAILURE;
     END IF;
--Populate list item
     POPULATE_LIST(list_id, group_id);
--Destroy the temporary record group to release resources
     DELETE_GROUP(group_id);
EXCEPTION
     WHEN OTHERS THEN
     MESSAGE('Internal error occured in Popluate_the_List.');
     RAISE FORM_TRIGGER_FAILURE;
END Populate_the_List;
The error is FRM-41337 Cannot populate the list from record group. It happens when we open the form. We are using the same code to populate the lists on the child form (except the SQL statement is different) and it works correctly.
I appreciate your help.

Similar Messages

  • SharePoint 2013 Parent/Child Form

    All,
    I am completing some audits on accounts with audit names: AuditA, AuditB
    I have a SharePoint list 'AuditPopulation' with the following columns:
    AccountNumber
    AuditName
    Then as we are auditing accounts we have audit questions based on the applicable audit. Therefore I have a list called 'AuditQuestions' with the columns:
    QuestionID
    Question
    Answer (Pass/Fail)
    AuditName
    I am struggling with how to link to the two lists and create a form (most likely in InfoPath) that will display the list of Questions for AuditA when the user clicks the AccountNumber in the 'AuditPopulation' list.
    Thank you in advance

    You can use jQuery and Web Service to achieve this task using SharePoint Designer. Refer to the following post for more information
    http://sharepoint.stackexchange.com/questions/6493/how-to-automatically-link-parent-in-child-list-new-form
    http://go.limeleap.com/community/bid/246651/Creating-Forms-for-SharePoint-Using-SharePoint-Designer-2010
    http://www.sharepointdrive.com/blog/how-to-establish-a-parent-child-relationship-in-sharepoint/
    --Cheers

  • How to populate data from table into datagrid in form

    hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks

    Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
    Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null.

  • Parent Child Form

    How can i show the form in parent child style
    B1 SDK?? It just like the form handling in .NET

    Parent/Child (Aka Modal forms) forms can't be done in SDK at the moment... Modal forms have been promised for some time now and latest is promised in the SBO2006A..
    If you need to do it, the best way is to save a parent forms uid in the child form (in a userdatasource). That way you will always have control of the parent form and if it is closed, you can give a good error message.

  • Display select list from query on manual tabular form

    Hello,
    I'm trying to display a select list from query on a manual tabular form. I'm using a collection to store the data. I can't seem to get the query to work. I can display the item as a text item. Any help would be appreciated. Thanks, Elizabeth.
    SELECT
    -- Notice how I'm keeping the idx value the same as the column value in the collection. This helps to keep things organized
    -- I also apply an id to each entry
    -- I append the error value to the empname and sal
    -- The Seq_id. Usefull when hiding rows (for delete) and then submitting from
    apex_item.hidden(1,x.seq_id, null, x.seq_id || '_seq_id') ||
    -- The Primary Key of the column
    apex_item.hidden(2, x.ceah_people_id, null, x.seq_id || '_ceah_people_id') || x.ceah_people_id ceah_people_id,
    -- Employee Name
    case when x.seq_id = -1
    then
    apex_item.select_list_from_query (3,
    NULL,
    'select distinct language_name d, '
    || 'language_id r from foreign_language',
    'style="width:170px" ' ,
    'YES',
    '0',
    '- Select Language -',
    'x.seq_id_' || LPAD (9900 + LEVEL, 4, '0'),
    NULL,
    'NO'
    else
    apex_item.text (3,(select language_name from foreign_language where x.language_id = foreign_language.language_id),
    80,
    100,
    'style="width:170px" readonly="readonly"',
    'f32_' || LPAD (ROWNUM, 4, '0')
    end
    || err.language_id language_id,
    /* apex_item.text(3,x.language_id,null, null, null, x.seq_id || '_language_id') || err.language_id language_id,
    -- Employee Salary
    apex_item.text(4,x.proficiency, null, null, null, x.seq_id || '_proficiency') || err.proficiency ||
    -- Store the sql action type as well.
    apex_item.hidden(50,x.sql_action_typ, null, x.seq_id || '_sql_action_typ_id') proficiency,
    -- Last but not least the row error
    err.row_error
    FROM (SELECT ac.c001 seq_id,
    ac.c002 ceah_people_id,
    ac.c003 language_id,
    ac.c004 proficiency,
    ac.c049 modifiable_flag,
    ac.c050 sql_action_typ
    FROM apex_collections ac
    WHERE ac.collection_name = 'DATA_COLLECTION'
    ORDER BY ac.seq_id) x,
    -- Error Collection
    (SELECT ac.seq_id seq_id,
    ac.c002 ceah_people_id,
    ac.c003 language_id,
    ac.c004 proficiency,
    ac.c050 row_error -- Useful when individual data is correct, however the row of data is not. Ex: start/end dates
    FROM apex_collections ac
    WHERE ac.collection_name = 'ERROR_COLLECTION'
    ORDER BY ac.seq_id) err
    WHERE x.seq_id = err.seq_id(+)

    I got so frustrated I started over. I'm following the how to create a manual form.
    http://www.oracle.com/technology/products/database/application_express/howtos/tabular_form.html#MANUAL
    The problem I'm now having is even though I display items as hidden, there is a column holder on the report for them. If I go into the report attributes and toggle the show attribute off I cannot reference an items value in my logic. I used /&nbsp/ for the column heading but I still get the little sort arrow where the column heading should be. I tried to toggle the sort attribute off but the sort arrow still shows up. How can I use the apex_item.hidden and not get a place holder for the column on a report? Thanks, Elizabeth
    Here is the code I'm using to generate the report:
    select x.ceah_people_lang_id,
    x.language_id,
    x.proficiency,
    x.ceah_people_id
    from (
    select apex_item.hidden(1,ceah_people_lang_id) ceah_people_lang_id,
    apex_item.select_list_from_query(2,language_id,'select language_name, language_id from foreign_language') language_id,
    apex_item.select_list_from_query(3,proficiency,'select name, id from proficiency') proficiency,
    apex_item.hidden(4,ceah_people_id) ceah_people_id
    from ceah_people_language where ceah_people_language.ceah_people_id = :P152_person_id
    union all
    select apex_item.hidden(1,null) ceah_people_lang_id,
    apex_item.select_list_from_query(2,null,'select language_name, language_id from foreign_language') language_id,
    apex_item.select_list_from_query(3,null,'select name, id from proficiency') proficiency,
    apex_item.hidden(4,null) ceah_people_id
    from dual) x

  • Excluding Datamember from Update in Parent-Child hierarchy

    Hello,
    I have a Parent-Child hierarchy and writeback enabled measures.
    If I make an equal allocation update on a parent element, its datamember gets the same amount as the leaf elements.
    How can I override this feature (scope and cell calulation for datamembers would not do...)?
    I mean: if I have 4 leaf members and I write on the parent element I want to see 250 on leaves - and null on DataMember -, instead of 200 on each elements (including datamember).
    I would not convert the Parent-Child to normalized hierarchy if I have any chance to switch off the datamembers.
    Thank you for your answers in advance!
    Br,
    Peter

    Hi Peter,
    Thank you for your question. 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Parent Child forms

    Hi,
    I've only just started playing with swing forms, I've created a few and now I've decided that I want some to be parent frames and some to be child frames - what's the best way to go about this?
    A little explaination
    I have a main login panel then dependant on your login type you get a buyers or a sellers panel, each one on those panels can then click to a couple of others e.g add item or delete item. when these 3rd level forms are closed (using the cross) It does a sytem.exit but I want it to go back to the parent form and refresh the datatable I have made (a list of the sellers items for instance). All panels are currently JFrames, is there a quick way to convert them?
    Thank you
    Sara :)

    Make them JDialogs instead and remove the System.exit() call. See [the tutorial|http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html].
    Also the is a Swing forum which is a better place for Swing questions.

  • Showing a date listing from recordset, how to fill in dates not listed?

    I have been several different directions on this, but this may work.
    I am trying to list a date range like Nov 1 through Nov 8, ie Nov1, Nov2, Nov3, etc and under each date show a recordset COUNT for that date and if there is no record matching that date, show 0 .
    I have this sql
    mysql_select_db($database_connbubba, $connbubba);
    $query_rs_count = "SELECT yard_sales.yardsale_date,DATE_FORMAT(yard_sales.yardsale_date, '%b %d') AS theDate,COUNT(*) FROM yard_sales WHERE yard_sales.yardsale_date>=CURDATE() GROUP BY yard_sales.yardsale_date";
    $query_limit_rs_count = sprintf("%s LIMIT %d, %d", $query_rs_count, $startRow_rs_count, $maxRows_rs_count);
    $rs_count = mysql_query($query_limit_rs_count, $connbubba) or die(mysql_error());
    $row_rs_count = mysql_fetch_assoc($rs_count);
    user posts their yard sale information into the db and column yardsale_date is date YYYY-MM-DD
    so with this setup, i have a table with 2 rows (rs_count.theDate and rs_count.COUNT) and the table repeats horizontally.
    so the result is
         Nov2                  Nov6                   Nov8
    1 Yard Sale          2 Yard Sale         1 Yard Sale
    How can i get
         Nov2                 Nov3                   Nov4                 Nov5                   Nov6                      Nov7                  Nov8
    1 Yard Sale         0 Yard Sale         0 Yard Sale       0 Yard Sale         2 Yard Sale          0 Yard Sale        1 Yard Sale
    thanks for your help,
    jim balthrop

    You can't show data that does not exist, so you first need to create another calendar table that includes all possible dates. You can then outer join that table to your main table. Pull the dates from the calendar table and count the number of sales in your main table. Group by calendar table dates.

  • Populate List from Database (Very Strange Behaviour)

    Dear Fellows,
    I have developed a from which has two lists One for Major (say) and Other for Minor (say), thesr minors are based on the value of Major.
    Now I have developed this system on Windows XP Professional, Developer/2000 6i and Oracle 8i (release 8.1.7).
    Major list is populated from database and it shows all major values now using 'when_list_change' trigger the minor list is populated from the database based on the value of major list. Interestingly enough it is working fine without any problem.
    Now I have deployed the software to Windows 2000 Professional/Server (tried on both), Developer/2000 6i and Oracle 8.0.5, but strangly the lists are not working now. First list (major) is still working but the other dependent lists are not working.
    Another strange thing is that it populate the second list for one particular value (only at times).
    The logic is that I have used a program unit to which i am passing 'list element' and 'query' and call it for each list in the when-list-change trigge.
    Now its a very strange behaviour, I don't know what to do?
    Your cooperation will be highly appreciated.
    regards.

    rolrollerx wrote:
    Hi,
    I have Nokia N8 (a great phone, btw) with Symbian Anna. I wanted to download the maps. But the PC Ovi Suite is just busy forever, without downloading anything (I used Performance Monitor to find out it was doing nothing for hours).
    As I have unlimited data plan from my phone, I decided to try updating directly from the phone instead. It successfully downloaded the list of maps, but when I selected one of them
    "No Wi-Fi network available. Please configure a WiFi access point in the phone Internet destination settings."
    Why should I do that? I have a working connection on that phone (as evidenced by the successful download of the list of maps). So now, I am stuck. How can I download the maps?
    Well, the suggestion is there. Use a router.
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • Parent / Child forms or sharing a parent region across child tabs

    I want to find a way to have the same region appear on multiple pages.
    ApEx has a good master / detail form wizard. And I have used other constructs (master view, report, "add a detail record button", etc) to make the screens more user friendly, less prone to user error, etc.
    In the past where there are a small number of these maintenance requirements I have used tabs, select list, menus, etc. to manage the user experience.
    I am now faced with an explosion of these types of tasks that require a fairly large dataset to be broken into many smaller maintenacne pages that are accessed by the role of the user. Could be up to 250 of these "master/detail" screens.
    I want to avoid 250 copied regions, or 10 regions copied 25 times... I want to have a single instance of a "master summary" region that I can share across several pages. The idea is to have as little redundant code (regions) as possible to ease developement and maintenance.
    I haven't figured this out yet and it does not seem anyone else is even looking for this functionality. Am I all alone with this need...
    Guess I'll go have a beer... or six.
    Any ideas are appreciated and I will buy a beer for anyone who shows up at my sailboat in Santa Cruz on April 20th.
    Sam

    I thought about that as an option. Create several regions on page 0 that were defaulted to not display and then have them appear as needed. That may be the answer.
    My level of sophitication with Apex is good when it is db desing, app design, ui, but I am not a WEB developer and so the finder points of HTML or java are somewhat a mystery to me.
    I saw some writeups on htmldb_get as being able to call shared processes or application pages. I know I can redirect to a ApEx url, I wondered if there was a way to call a region as an option.
    Thanks for the input,
    Sam

  • Best Method For Parent/Child Form Interaction

    Can anyone advise the best way to achieve the following?
    * I have two forms
    * Form1 creates an instance of Form2
    * A user action on Form2 will affect a change on Form1
    At the moment, when Form1 creates Form2, it adds an event handler to a method within Form1;
    lookupFrame = new accountLookupFrame();
    lookupFrame.lookupTable.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    lookupTableMouseClicked(evt);
    lookupFrame.setVisible(true);For this to work, Form2 is set for public access. Is there a better way of achieving this effect?

    Check out my ParamDialog class (added below). In particular, check out the applyOnChange method. When this is switched on, any changes to the parameter fields will generate an apply() event (ParamDialog must be overridden to specify what happens on apply)
    You should also be able to find StandardDialog by searching here; I just linked someone else to it. I think that should be all you need.
    You are welcome to use and modify this code, but please do not change the package or take credit for it as your own work
    ParamDialog.java
    ==============
    package tjacobs.ui;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import javax.swing.AbstractButton;
    import javax.swing.JButton;
    import javax.swing.JCheckBox;
    import javax.swing.JComboBox;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JMenuBar;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    import javax.swing.text.Document;
    import tjacobs.CollectionUtils;
    //import tjacobs.OmniListener;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.InputMethodEvent;
    import java.awt.event.InputMethodListener;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import java.beans.VetoableChangeListener;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Observable;
    import java.util.Observer;
    import java.util.Properties;
    /** Usage:
    * *      ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
    * pd.pack();
    * pd.setVisible(true);
    * Properties p = pd.getProperties();
    public class ParamDialog extends StandardDialog {
         public static final String SECRET = "(SECRET)";
         public static final String CHECKBOX = "(CHECKBOX)";
         public static final String BUTTON = "(BUTTON)";
         public static final String BUTTON_SOLO = "(BUTTON_BOTH)";
         //public static final String BLANK = "(BLANK)";
         public static final String COMBO = "COMBO)";
         String[] fields;
         HashMap<String, GetText> mValues = new HashMap<String, GetText>();
         private boolean mShowApplyButton = false;
         //private Observable mObservable;
         //private OmniListener mOmniListener;
         private static interface GetText {
              public String getText2();
              public void setText2(String txt);
         private static class TextField extends JTextField implements GetText {
              public void setText2(String s) {
                   setText(s);
              public String getText2() {
                   return getText();
         private static class PasswordField extends JPasswordField implements GetText {
              public void setText2(String s) {
                   setText(s);
              public String getText2() {
                   return getText();
         private static class TextButton extends JButton implements GetText {
              public TextButton(String s) {
                   super(s);
              public void setText2(String s) {
                   setText(s);
              public String getText2() {
                   return getText();
         private static class TextCheckbox extends JCheckBox implements GetText {
              public void setText2(String s) {
                   setSelected("true".equals(s));
              public String getText2() {
                   return "" + isSelected();
              public void _setText(String s) {
                   super.setText(s);
              public String _getText() {
                   return super.getText();
              public String getLabel() {
                   return "";
         private static class TextCombo extends JComboBox implements GetText {
              public String getText2() {
                   return getSelectedItem().toString();
              public void setText2(String str) {
                   setSelectedItem(str);
         public ParamDialog(String[] fields) throws HeadlessException {
              this(null, fields);
         public ParamDialog(JFrame owner, String[] fields) {
              this (null, fields, null);
         public ParamDialog(JFrame owner, String[] fields, String[] initialValues) {
              super(owner);
              setModal(true);
              this.fields = fields;
              JPanel main = new JPanel();
              JPanel buttonP = null;
              UniversalChangeListener ucl = null;
              if (applyOnChange()) {
                   ucl = new UniversalChangeListener() {
                        public void apply(AWTEvent ev) {
                             ParamDialog.this.apply();
              main.setLayout(new GridLayout(fields.length, 1));
              for (int i = 0; i < fields.length; i++) {
                   JPanel con = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    /*               if (fields.endsWith(BLANK)) {
                        //add space filler
                        buttonP = null;
                        con.add(new Component(){
                             public Dimension getPreferredSize() {
                                  return new Dimension(40, 15);
                        //con.add((Component)null);
                   else
                   if (fields[i].endsWith(BUTTON_SOLO)) {
                        JLabel l = new JLabel(fields[i].substring(0, fields[i].length() - BUTTON_SOLO.length()));
                        con.add(l);
                        TextButton jb = new TextButton("...");
                        //if (ucl != null) {
                        //     ucl.addComponent(jb);
                        mValues.put(fields[i], jb);
                        con.add(jb);               
                   else
                   if (fields[i].endsWith(BUTTON)) {
                        TextButton jb = new TextButton(fields[i].substring(0, fields[i].length() - BUTTON.length()));
                        //if (ucl != null) {
                        //     ucl.addComponent(jb);
                        mValues.put(fields[i], jb);
                        if (buttonP != null) {
                             buttonP.add(jb);
                             buttonP = null;
                             continue;
                        else {
                             con.add(jb);
                             buttonP = con;
                   else {
                        buttonP = null;
                        if (fields[i].endsWith(CHECKBOX)) {
                             TextCheckbox tb = new TextCheckbox();
                             if (ucl != null) {
                                  ucl.addComponent(tb);
                             con.add(new JLabel(fields[i].substring(0, fields[i].length() - CHECKBOX.length())));
                             con.add(tb);
                             //if (initialValues != null && initialValues.length > i) {
                             //     tb.setText(initialValues[i]);
                             mValues.put(fields[i], tb);
                        else if (fields[i].endsWith(COMBO)) {
                             int idx = fields[i].lastIndexOf('(');
                             if (idx == -1) {
                                  throw new IllegalArgumentException(fields[i]);
                             String[] args = fields[i].substring(idx + 1, fields[i].length() - COMBO.length()).split(" ");
                             TextCombo combo = new TextCombo();
                             for (int j = 0; j < args.length; j++) {
                                  combo.addItem(args[j]);
                             combo.setEditable(false);
                             fields[i] =fields[i].substring(0, idx);
                             JLabel l = new JLabel(fields[i].substring(0, idx));
                             if (ucl != null) {
                                  ucl.addComponent(combo);
                             con.add(l);
                             con.add(combo);
                             //mValues.put(idx == -1 ? fields[i] : fields[i].substring(0, idx), combo);
                             mValues.put(fields[i], combo);
                        else if (fields[i].endsWith(SECRET)) {
                             PasswordField tf;
                             con.add(new JLabel(fields[i].substring(0, fields[i].length() - SECRET.length())));
                             tf = new PasswordField();
                             if (ucl != null) {
                                  ucl.addComponent(tf);
                             tf.setColumns(12);
                             con.add(tf);
                             if (initialValues != null && initialValues.length > i) {
                                  tf.setText(initialValues[i]);
                             mValues.put(fields[i], tf);
                        else {
                             TextField tf;
                             con.add(new JLabel(fields[i]));
                             tf = new TextField();
                             if (ucl != null) {
                                  ucl.addComponent(tf);
                             tf.setColumns(12);
                             con.add(tf);
                             if (initialValues != null && initialValues.length > i) {
                                  tf.setText(initialValues[i]);
                             mValues.put(fields[i], tf);
                   main.add(con);               
              this.setMainContent(main);
         public Component getComponentForField(String name) {
              return (Component)mValues.get(name);
         public boolean showApplyButton() {
              return mShowApplyButton;
         public void setActionListener(String buttonName, ActionListener listener) {
              GetText gt = mValues.get(buttonName);
              if (gt instanceof AbstractButton) {
                   AbstractButton ab = (AbstractButton) gt;
                   ab.addActionListener(listener);
         public void apply() {
         private boolean mCancel = false;
         public void cancel() {
              mCancel = true;
              super.cancel();
         public void setField(String field, String value) {
              //JTextField tf = mValues.get(field);
              GetText tf = mValues.get(field);
              if (tf != null) {
                   tf.setText2(value);
         public Properties getProperties() {
              if (mCancel) return null;
              Properties p = new Properties();
              for (int i = 0; i < fields.length; i++) {
                   p.put(fields[i], mValues.get(fields[i]).getText2());
              return p;
         public void setProperties(Properties p) {
              Iterator<Object> _i= p.keySet().iterator();
              while (_i.hasNext()) {
                   String key = (String) _i.next();
                   String value = (String) p.get(key);
                   setField(key, value);
         public void enableLoadAndSave() {
              JMenuBar bar = new JMenuBar();
              FileMenu fm = new FileMenu() {
                   public void save(File f) throws IOException {
                        FileOutputStream out = new FileOutputStream(f);
                        getProperties().store(out, null);
                   public void load(File f) throws IOException {
                        FileInputStream in = new FileInputStream(f);
                        Properties p = new Properties();
                        p.load(in);
                        setProperties(p);
                   public boolean showSaveAs() {
                        return true;
              fm.setPrevSaveFile();
              bar.add(fm);
              setJMenuBar(bar);
         public static void main (String[] args) {
              //ParamDialog pd = new ParamDialog(new String[] {"A", "B", "C"});
              //WindowUtilities.visualize(pd);
              //Properties p = getProperties(new String[] {"A","B","C"});
              //String strs[] = new String[] {"A" + BUTTON, BLANK, "B" + CHECKBOX, "C" + SECRET, "D", "E"};
              String strs[] = new String[] {"A" + BUTTON, "Z" + BUTTON, "B" + CHECKBOX, "C" + SECRET, "D", "E", "F (A B C" + COMBO};
              String initial[] = new String[] {"A", "", "true", "pass", "", ""};
              ParamDialog pd = new ParamDialog(null, strs, initial);
              ActionListener al = new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        System.out.println(((JButton) ae.getSource()).getLabel());
              pd.setActionListener("A" + BUTTON, al);
              pd.setActionListener("Z" + BUTTON, al);
    //          pd.addObserver(new Observer() {
    //               public void update(Observable o, Object obj) {
    //                    System.out.println("got update");
              pd.enableLoadAndSave();
              WindowUtilities.visualize(pd);
              Properties p = pd.getProperties();
              //CollectionUtils.printCollection(p);
         public static Properties getProperties(String[] fields) {
              ParamDialog pd = new ParamDialog(fields);
              //pd.setModal(false);
              WindowUtilities.visualize(pd);
              return pd.getProperties();          
         public void setShowApplyButton(boolean b) {
              mShowApplyButton = b;
         public boolean getShowApplyButton() {
              return mShowApplyButton;
         public boolean applyOnChange() {
              return false;
         public void save(File f) throws IOException {
              FileOutputStream out = new FileOutputStream(f);
              getProperties().store(out, "params");
         public void load(File f) throws IOException {
              Properties p = new Properties();
              p.load(new FileInputStream(f));
              setProperties(p);
    //     public void dispose() {
    //     super.dispose();
    //     Iterator _i = mValues.values().iterator();
    //     while (_i.hasNext()) {
    //          JComponent c = ((JComponent)_i.next());
    //          //c.addPropertyChangeListener("value", listener);
    //          //c.addVetoableChangeListener(listener2);
    //          //c.addInputMethodListener(listener3);
    //          mOmniListener.remove(c);

  • How to create two linked lists (Master/Detail or Parent/Child)

    I need to create a couple of related lists in a Master/Detail approach. Users are supposed to choose one "Master" Option, and "Detail" column should be refreshed to display only the items that are strictly related to the chosen option
    in "Master". Any posible solution?
    Thanks in advance.

    One option is to connect two web parts. This will give you option button for your master list web part and based on the value selected your results will be filtered in the detailed list web part. Here is the example. Though it is for SP 2010 it should work
    the same in SP 2013.
    http://sarahlhaase.wordpress.com/2012/05/21/connecting-web-parts-with-a-selector-and-a-detail-pane-sharepoint-2010-version/
    Second option is with some customization using Jquery.
    http://summit7systems.com/creating-a-parentchild-list-relationship-in-sharepoint-2013/
    Amit

  • Child form editing when approval workflow is triggered in OIM 9i

    Hi All,
                I am working with oim 9i.I wanted to know if there is any way to prevent editing of child form once it is submitted for approval.
                I have a object form with a child form attached.
                I have these forms attached to a resource object.
                It has approval task with 3 levels of approval.
                When user requests for the resource object, he has to fill the object form and child form has to be filled by approvers.
                But user is able to fill child form also.
                Also after 1st approval is complete.The requester is still able to edit child form.
                The requester is allowed to edit child form till last approver approves.
               In Resource Object and form Object administrator i have added group as- SYSTEM Administrators.
               HOW to PREVENT requester from adding data in child form once approval is triggered..
               PLEASE help.
    Regards,
    OIM 9i user

    okk...thanks for the replies..
    I am a newbie and wanted to know how to call this process task adapter as i currently have entity adapter on POST-insert on child form which identifies that there is some update..So does that means through entity adapter i need to call the process task of a approval process?
    Also is it possible to get the value of user who updated the child form as soon as it is updated?
    On post-insert adapter when i try to get the value of "formupdate by" whenever it is triggered it gives me the previous "update by" and not the current "update by" value?
    Does the database get updated later or am i doin somethng wrong,beacuse if it is a post-insert i should get values of "latest update by" on the form?

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • Parent Child list form using infopath 2013

    Hi All
    I have two SharePoint list heaving parent child relation ship ( one parent have multiple child) now i want to create a single form in info path 2013 using code less solution . I am using SharePoint Online don't want to use c# code.
    Journey Man

    Hi,
    Please check this
    https://www.sharepointdrive.com/blog/how-to-establish-a-parent-child-relationship-in-sharepoint/
    http://sharepoint.stackexchange.com/questions/6493/how-to-automatically-link-parent-in-child-list-new-form
    Please remember to click 'Mark as Answer' on the answer if it helps you

Maybe you are looking for