No announcement yet.

Master/Details with one field on master and a single form as detail

  • Filter
  • Time
  • Show
Clear All
new posts

  • Master/Details with one field on master and a single form as detail

    Dear all,
    I've a table that has lots of members of an associations. They have yearly card and every year its number is different from previous (like an ID/year).
    I'm trying to connect two single form.
    I have to select first the year (I thought the it's the Master form) and then, connected as detail, I I have the complete member single forms of each member (detail).
    In that way I'm sure to see only members data connected to a single year.

    The M/D wizard do not show single forms as default so I'm wondering if I can do what I've exposed here above.
    Is it possible to have the same result using an other approach ?

  • #2
    Not quite sure what you want. But connecting two single forms (showing one record at a time) is not possible. I thought of creating an application link and then configure it to be shown in an iframe, but that cannot be done on a single form as basis. But you want to see only data of a certain year. Why not create a simple form to set a filter on year into a global variable and take that with you as guideline on all your other forms? Or you can put a select field on any form and use an on-change ajax event to fill a global variable. But perhaps I'm missing the point?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development /


    • #3

      I have done something like this:

      1) change the detail form to the editable grid and save

      2) Go to the master form --> Master/detail -> New detail

      3) Now, as you have changed the detail form to editable grid, it should be visible there and you can add it as a detail form

      4) After you've added the form as detail, go to the detail form itself and change it's orientation as single form.

      I have done something like this and it has worked.

      Hope this helps.



      • #4
        Hi Albert,
        thanks for reply,
        more or less that was I wanted. So single to single it's not possible. So the master/detail approach is not praticable.
        I've created a form (FORM1) with only a year select field member_year_ref, putting it OnValidate as Global V {member_year_ref} = [ref_members_year];
        I imagine to put this single field form at very first top part in evidence of the screen. I don't know how to put then the main form (FORM2 - with all member details) below it without using a link or a window change.

        I'll try to use a new select field for the year selecting.
        Ok also OnChange it's good but I also want to propose, first time access, the current year as default.
        Let me know if I'm right or not:

        1. OnScripInit : $curYear = date('Y'); [curYear]= $curYear; this is to propose a default to select year form field --> {member_year_ref} = [curYear];

        2. SQL : add a Where condition like WHERE member_year = '{member_year_ref}'
        Does it work also the first time I access ? OnScriptInit start before of SQL ?

        3. If a user changes later the select year field , how can I'll be sure that form records will be filterd by that new year . Have I to put a sort of requery OnChange field event ? Which is the right sintax ?

        4. The member_year field is only available under 'insert' mode and not under 'update'

        I hope you'll understand what I mean ;-))


        • #5
          Hi Ishwor,

          Thanks for reply too.
          Your hint/trick seems very nice to me.
          I'll like definitely to test it.
          Just a question:
          On the first (master) single field form I would like to have only the select year field and have then the detail form that update itself automatically just in case I edit it.
          How did you perform this point ?
          The first time you access to master form do you use
          OnScripInit : $curYear = date('Y'); [curYear]= $curYear; this is to propose a default to select year form field --> {member_year_ref} = [curYear];