cancel
Showing results for 
Search instead for 
Did you mean: 

Datawindow inside a datawindow

Former Member
0 Kudos

I'm wanting to create a datawindow, that has a child data window with multiple records.

I have a person record... that has notes assigned to the person.

I'd like the notes to have multiple records.

I will store the user entering the Note / Deletion flag / date entered / text note

my original person record will look similar to this

With the notes area to look something, like below.

I think I did something like this before, but I can't remember it. 

Is it possible to do this?   can you point me in the right direction?

will it be difficult to maintain the updates on this.   Sometimes, we've done pop-up screens that would do some of the detailed updates

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If I understood your post correctly, you are wanting to create a data entry datawindow with a master detail approach. The master is the person and the detail is the notes. And you want the detail to be a child datawindow. So, what you want to do is:

- Create a datawindow for notes - which is the detail dw.

- Create a datawindow for person - which will be the master dw and insert the notes dw into this as a nested dw.

- Then you want to do a data entry for that approach.

Is that what you are looking to do?

Former Member
0 Kudos

Yes... the master / detail approach

Former Member
0 Kudos

There is a little problem with nested datawindows and composite datawindows. They are good for reports but not so good to use for editing because they only visible in print preview mode!

So I think you have to use a separate datawindow control in your window to display the details.

Former Member
0 Kudos

Hi Scot;

  Of the top-of-my-head, I cannot see any issues with your approach to display the related datum. The key coding point will be if you wanted to maintain a given note from the child DDDW (I am assuming not at the moment).

Regards ... Chris

Former Member
0 Kudos

I guess my question is this...

I can't seem to insert a data window, into my current datawindow.

so... how can i get it there?

do I need to use another type of datawindow, like composite?

if I need to do a different datawindow, is there an easy way to change the type

of the current one?  or, do I need to recreate the whole thing?

Former Member
0 Kudos

Would you not just want to change the column in the Detail DWO to be an EditStyle of DDDW?

Former Member
0 Kudos

but, in a DDDW I didn't think that I could display multiple columns

I was hoping to be able to display and update

Whether the Notes have a deletion flag associated / User who created the note / Date created /

   and the Notes that were created in that instance

I suppose that I could create a pop-up window to do all the work...

and just display in the main data window

Former Member
0 Kudos

   Yes, DDDW's can have as many display columns as you require! This would be great for displaying a list of attached notes and related date, time, reason, etc information "at a glance". However, DDDW's were never designed for updating.

  My suggestion though would be to place a Command Button next to the DDDW column with just some Ellipses for text. When the user presses the CB, this then takes you to a "notes" maintenance response dialogue.

For example ...

  Food for thought. 

Former Member
0 Kudos

chris

    I guess I'm a little confused on how to setup the original dddw

does the master record, need to have a column (for example notes)

I have one table, with... say employee information.

    another table, that has notes about the employee... tied with the employee #

I'd like to View all the notes, on the main dw....  Displaying multiple columns from the detail table

I'm fine with having a pop-up

to do the maintenance on the notes.

i thought that the point of a dddw was to return a value, based upon a list.   Kind of like a code table.

can you point me in the write direction.... or, to an example.

thanks

Former Member
0 Kudos

Hi Scot;

  The DDDW can have as many columns in its detail band as you require. When the DDDW "drops" all the visible columns will appear. Of course, the DDDW feature was designed around using a tabular DW presentation style. For the notes column I would use the new "Ellipses" feature in the Edit Style feature so that the use would see the basic text of the note data with a "..." at the end - but could see a little more when hovering the mouse over the column. The user will probably still need to get to a response window dialogue though to see the full note text (& maintain it if allowed).

HTH

Regards ... Chris

Former Member
0 Kudos

can the dddw be set, so you don't have to click to display the list?

I don't really have a column to make use of... to set the drop-down data window to

would I use a temp column on the query

Former Member
0 Kudos

Hi Scot;

  I'm not really sure what you mean by "DDDW SET". Can you elaborate?

Regards ... Chris

Former Member
0 Kudos

i don't really want to Pick a result from the displayed dddw

I simply want the user to be able to scroll thru the list.

my experience with dddw... would be to Pick one of the items in the list

and, that value would be Saved on the main record

a lot like picking a value from a code table.... a single result

i would like to have multiple records to be displayed

I'd like to pop-up a new window.... when one of the items is double clicked

on the pop-up... they can make changes

does that make sense?

Former Member
0 Kudos

i guess I'll need 2 datawindow controls... something like this

Former Member
0 Kudos

Ahhh ... OK - your vision is getting clearer to me now!  

1) For the review only DDDW ... how about:

  a) add a User Event to your DW controls mapped to "pbm_dwndropdown"

  b) add a User Event to your DW controls mapped to "pbm_closedropdown"

  c) now code the "pbm_dwndropdown" event to set the column into read only mode

  d) now code the "pbm_closedropdown" event to see if changes were made.

      If so, use the SetItemStatus ( ) method to clear the update flag for that column

          in the DWO's primary buffer

2) For the "pbm_closedropdown" user event described above. Check if the user double-clicked it when the DDDW closed. If so, open another dialogue to handle the updates.

Food for thought.