UD100 | List All Parent Records in Tree View

(Tom Hulbert) #1

When I pull multiple parent records into UD100 the tree view only displays the first record selected in the search. In order to view the other records I have to use the navControl on the toolbar and either select from the dropdown or use the arrow buttons.

Is there some way to make the tree view list all of the records I select similar to how Resource Group Maintenance works?

(Brandon Anderson) #2

Did you find a solution to this? I would like to see if I can get this to work as well.

(Tom Hulbert) #3

I haven’t yet. If I find a solution outside of this thread I will make sure to post it here.

(Chris Conn) #4

Bind to the epidataview called List - look in the object explorer.

(Tom Hulbert) #5

I tried that initially, but the List dataview does not include the UD fields for some reason.

(Chris Conn) #6

Very true - and sad unfortunately. You could maintain your own table (link the UD’s) whenever the List edv changes.

(Tom Hulbert) #7

Could you expand on this a little? Not sure I understand what you mean by maintaining my own table.

I found this little gem from @josecgomez, but I don’t know how to add/bind the UD columns from UD100 to the view. Mike, Peter, and Molly weren’t able to explain it to me unfortunately. :confused:

(Chris Conn) #8

Lol - those useless punks.

So Jose’s article is very relevant. It’s basically about making the underlying table that will be the holder of the EDV’s data. Add all the columns (and their types) for the data you need - since you are going to manually build this table, I would only grab the stuff I really needed. There is the possibility you could CLONE the data structure of the existing UDxxx (not the list) edv table. This would effectively give you EVERY column in a UD record (since the non-list version also shows UD).

Once the table is built, then you use the snippet from Jose to make an EDV for it - making it bindable to controls.

All done. Haha just kidding - that’s just the setup. Now you have to maintain the data in the table.

I envision placing an event on the LIST edv so that when it’s data changes, we update our table accordingly. Pseudo-code to follow:

One potential method - copy rows from the list

  foreach (DataRow drtableOld in ListTable.Rows)
       //now here you'd grab your UD fields manually - perhaps a DB lookup, or just looking in the adapter  


Now that I’ve written that down - it seems like you might as well just look at all of the SysRowID of each record of the LIST, then just DB lookup those entire records while you’re at it and use that to populate your table. I am unsure of the efficiency.

(Jose C Gomez) #9

Creating your own EpiDataView for this seems like a bad idea. This specific screen the UD100 is based on an EpiTransaction style called Multi-View vs Single View. Like the UD01 (which do allow multiple parents)
You could create your own EpiDataView but I think the form itself won’t let you pull in more than one UD100 record at a time.
You are going to have to write it all yourself which seems like a lot of work… It’s doable… but yuck