Page 1 of 1
Drag and Drop Vertically
Posted: Thu Oct 03, 2013 2:20 pm
by devinst
I would like to do a drag and drop from one subfile to another but I want to be able to insert the dropped element into the subfile vertically. I know that the normal process is to insert horizontally but I am trying to insert events in a time line that runs left to right rather than up and down. I am pretty sure that there is nothing that can be done using the normal drag and drop methods but is there some type of work around.
I tried making fields in the receiving subfile able to receive the drop but that does not seem to work when dragging from a subfile onto a field.
I tried dragging from a field in the subfile record also, but I am not able to retrieve the field value on the drag so that I know which subfile record it is coming from.
Any help or suggestions would be greatly appreciated.!!!
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 9:00 am
by Scott Klement
I'm sorry, I don't understand. Can you explain what you mean by "insert vertically" and "insert horizonally" in your description, and how these are stopping you from doing what you need? It seems to me that the RPG program handles inserting data, so it should be able to insert it any way it wants to.
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 9:33 am
by devinst
Wow, I think I really messed that description up, sorry.!!
Ok, let me see if I can do a better job. I have two subfiles on a screen. The first has a listing of orders with only one column. The second is a listing of trucks with multiple orders assigned. The second subfile has 4 columns. The first column contains information about the truck and driver. The second column contains info about the first order. The second and third contain info about the second and third order.
I would like to be able to drag an order from the order listing and drop it onto an order in the truck subfile and then in the program know where it was dropped so that I can insert the dragged order into the truck's order listing. The insertion will be done in the program using arrays of course. Then a rewrite of the subfile will show the order inserted.
When doing drag and drop from subfile to subfile the system attempts to do the insert by rows rather than columns, and understandably so.
Does that mare more sense? Thanks.!!!
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 9:48 am
by Scott Klement
The 'dd record number' and 'dd element id' field can be bound to RPG fields. When the user drags the field from the initial SFL to the destination SFL, the 'record number' field should tell which RRN the user dragged from. The 'element id' should tell you which field it was dropped into.
Your program logic can then shift the fields in the subfile around as needed and redisplay things the way you want them.
It's not the system that inserts the record into the destination subfile, it's your RPG code.
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 11:51 am
by devinst
That is all true, but I need to know what column it got dropped on in the subfile so I know where to insert the new item. The 'dd element id' only returns the subfile name. Am I missing something? Thanks.!!!
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 12:55 pm
by Scott Klement
Ah, I think I see what you're saying... the element ID is reporting the subfile's element ID instead of the individual field's element ID. Is that correct?
Re: Drag and Drop Vertically
Posted: Fri Oct 04, 2013 12:59 pm
by devinst
That is exactly what I am seeing.
Re: Drag and Drop Vertically
Posted: Mon Nov 11, 2013 11:38 am
by devinst
Any further suggestions on a solution? Thanks.!!
Re: Drag and Drop Vertically
Posted: Mon Nov 11, 2013 11:53 am
by Scott Klement
Unfortunately, I do not know what else to suggest. It looks like this is not supported by Profound UI at this time.