I am having a problem with Drag & Drop between grids (Standard Queries of the same BO).
They are in 2 panels on a VP, the only panels. On refresh/load the queries get populated and that all works fine..
The Left Query shows all the items of a certain TimeSlot_ID and the right Query shows a header record (no grouping or anything fancy), which there is one record for each different TimeSlot_ID. This is all the same BO, and basically the left query just filters out the headers, and the right query shows only the headers.
The Query on the left, you can see an ID number (which is the same for all in the left query), and you're supposed to drag them to one of the lines in the right Query which you can see the ID numbers on the last column. Theoretically... the Drop Process would change the Dragged ID to the ID of the line it was dropped on.
The Drop Process that gets called from the right Query when something is dropped, aside from displaying the message as per screenshot, changes the ID in That[BO] to the one in This[BO].
However... since it wasn't working.. (aside from removing the item from the left column and placing it in the right column on the screen... but no ID's got changed), I put a Display Message in to see what This and That were doing.... AND.. for some reason.. THIS has the ID of the item being dragged and THAT has no ID at all.
Going by the manual, THAT is the one being dragged and THIS is the one being dropped on (target). Or have I miss-read that a dozen times?
Also.. This and That are only referred to in How to implement item re-ordering... So is there something I'm missing here ?? Is there a different implementation for Drag & Drop between grids ?
I even tried seeing what the BO itself had in it in the Process, and it was the same value as This[BO].
My boss is going to kill me... I promised him drag and drop.
Drag & Drop between Queries
Drag & Drop between Queries
V8.8 / Windows / MySQL
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
THIS is the first BO brought into context
FIND BO WHERE BO.Attribute = 'xyz'
THAT is the second BO brought into context
FIND BO WHERE BO.Attribite = ThisBO.Attribute
ThatBO.Attribute=123
ThisBO.Attribute=456
FIND BO WHERE BO.Attribute = 'xyz'
THAT is the second BO brought into context
FIND BO WHERE BO.Attribite = ThisBO.Attribute
ThatBO.Attribute=123
ThisBO.Attribute=456
Last edited by PointsWell on Tue Jan 31, 2023 2:19 am, edited 1 time in total.
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Drag & Drop between Queries
Also if by ID's you mean ID's generated by Aware IM, then you cannot change them.
Aware IM Support Team
Re: Drag & Drop between Queries
Thanks. But that doesn't really help.PointsWell wrote: ↑Tue Jan 31, 2023 12:33 amTHIS is the first BO brought into contextThere are a ton of fucked things in this society that need fixed, it's not just housing being expensive.
FIND BO WHERE BO.Attribute = 'xyz'
THAT is the second BO brought into context
FIND BO WHERE BO.Attribite = ThisBO.Attribute
ThatBO.Attribute=123
ThisBO.Attribute=456
What would 'xyz' be ?
The Process knows nothing of either the dragged item or the node being dropped onto, except what BO it is, and should it not be getting it's information from This and That ?
At least that's what the documentation suggests.
ThisBO.Attribute comes up with the figure that should be (according to the HowTo.Pfd) in ThatBO.attribute, and ThatBO.attribute is empty, as per my Display Message...which is ...
Display Message 'That >' + Thatfreight.DeliveryTimeSlotID + '< and This >' + Thisfreight.DeliveryTimeSlotID + '<'
I'm lost on this. I've tried various different ways over the past 12 months to get it to work, and the only thing that works is using a Kanban BUT that's not gonna work, because all the columns have to be hard coded for the Kanban, and I need them to be dynamic because one day there might be 3 timeslots that allow a drop, another day there might 10, and having 10 lists on the screen isn't gonna be pretty, so I added a header record so to list them on the right.. same BO, standard query. This should work. The drag and drop does work on the screen (as per my initial post), but only on the screen.. it drops the left item into the right grid, but nothing under the bonnet works.
Oh. yeah.. v8.7
V8.8 / Windows / MySQL
Re: Drag & Drop between Queries
Thanks.. no it's a different ID field.. DeliveryTimeSlotID.aware_support wrote: ↑Tue Jan 31, 2023 1:01 am Also if by ID's you mean ID's generated by Aware IM, then you cannot change them.
V8.8 / Windows / MySQL
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
Whatever your search criteria which would bring your BO into context.
If the BO is an input to a process then the BO is already in context for the process.
The process is initiating with the BO as an input. Otherwise the process is executing on nothing.
Here's some help on how context is formed
Here's a video on context and prefixes
Here's a link to the help doc on Prefixes
Without seeing your process its not possible to know what you've brought into context.gernotlg wrote: ↑Tue Jan 31, 2023 1:45 am ThisBO.Attribute comes up with the figure that should be (according to the HowTo.Pfd) in ThatBO.attribute, and ThatBO.attribute is empty, as per my Display Message...which is ...
Display Message 'That >' + Thatfreight.DeliveryTimeSlotID + '< and This >' + Thisfreight.DeliveryTimeSlotID + '<'
Are you trying to drag an item from one query into a second query? This How to deals with how to change items within the same query.gernotlg wrote: ↑Tue Jan 31, 2023 1:45 am I'm lost on this. I've tried various different ways over the past 12 months to get it to work, and the only thing that works is using a Kanban BUT that's not gonna work, because all the columns have to be hard coded for the Kanban, and I need them to be dynamic because one day there might be 3 timeslots that allow a drop, another day there might 10, and having 10 lists on the screen isn't gonna be pretty, so I added a header record so to list them on the right.. same BO, standard query. This should work. The drag and drop does work on the screen (as per my initial post), but only on the screen.. it drops the left item into the right grid, but nothing under the bonnet works.
Oh. yeah.. v8.7
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
Just as an aside, there are better alternatives to drag drop, if you've got two grids visible.
Running a process on clicking on the line items requires less dexterity and will be faster.
Grid One - Deliveries available for reschedule
Grid two - Delivery slots that are open.
Place grid one on the left and grid two on the right.
Use a non persisted BO for Session Variables. Create two number fields, one for Delivery To Change and the Other for Open Delivery Slots. These must be set with an initial value of zero (otherwise you'll get errors and it won't work properly)
Create Two processes
Place one process as the default action on grid one. The process should take the BO and put the ID of the BO into SessionVariables.DeliveryToChangeID
Then check to see if SessionVariables.OpenDeliveryID is greater than 0. If it is call the process to make the change to the delivery slot
Place the second process as the default action on grid two. The process should place the BO.ID for the open delivery slot into SessionVariables.OpenSlotID. Then check to see if SessionVariables.DeliveryToChangeID is greater than 0, if it is call the process to make a change to the delivery slot.
The last step in the process should be to redisplay the layout. Don't use grid refresh on process as your grid will loose the highlighted BO and the end user will be confused.
This requires the user to click on two grid lines which is a more accessible solution than clicking dragging and dropping.
I only use IDs in SessionVariables (as opposed to BOs), because of the way that AIM executes the SQL to keep things in context, you obviously have to do the additional FIND to bring the other BO into context.
And apologies for the random copy and paste in my initial message. Feel free to delete it (please).
Running a process on clicking on the line items requires less dexterity and will be faster.
Grid One - Deliveries available for reschedule
Grid two - Delivery slots that are open.
Place grid one on the left and grid two on the right.
Use a non persisted BO for Session Variables. Create two number fields, one for Delivery To Change and the Other for Open Delivery Slots. These must be set with an initial value of zero (otherwise you'll get errors and it won't work properly)
Create Two processes
Place one process as the default action on grid one. The process should take the BO and put the ID of the BO into SessionVariables.DeliveryToChangeID
Then check to see if SessionVariables.OpenDeliveryID is greater than 0. If it is call the process to make the change to the delivery slot
Place the second process as the default action on grid two. The process should place the BO.ID for the open delivery slot into SessionVariables.OpenSlotID. Then check to see if SessionVariables.DeliveryToChangeID is greater than 0, if it is call the process to make a change to the delivery slot.
The last step in the process should be to redisplay the layout. Don't use grid refresh on process as your grid will loose the highlighted BO and the end user will be confused.
This requires the user to click on two grid lines which is a more accessible solution than clicking dragging and dropping.
I only use IDs in SessionVariables (as opposed to BOs), because of the way that AIM executes the SQL to keep things in context, you obviously have to do the additional FIND to bring the other BO into context.
And apologies for the random copy and paste in my initial message. Feel free to delete it (please).
Re: Drag & Drop between Queries
Here's the process.. so far. No point continuing when the basics isn't working...
Shouldn't Thatfreight.DeliveryTimeSlotID be the value of the target ? It's blank. Even the actual ID is NULL.
Why is it blank? There is nothing in ThatBO, and ThisBO and BO have the values of the left grid, instead of the right grid.
Shouldn't Thatfreight.DeliveryTimeSlotID be the value of the target ? It's blank. Even the actual ID is NULL.
Why is it blank? There is nothing in ThatBO, and ThisBO and BO have the values of the left grid, instead of the right grid.
V8.8 / Windows / MySQL
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
You haven't brought a second Freight BO into context, which you won't be able to do if the two Freight BOs are in different queries. Drag and drop re-ordering only works within the same query.
Until there are two instances of Freight BO you won't be able to make assignments.
Until there are two instances of Freight BO you won't be able to make assignments.
Re: Drag & Drop between Queries
I'm not trying to re-order. I'm dragging to a different grid.. same BO... as per the manual..PointsWell wrote: ↑Tue Jan 31, 2023 3:02 am You haven't brought a second Freight BO into context, which you won't be able to do if the two Freight BOs are in different queries. Drag and drop re-ordering only works within the same query.
Until there are two instances of Freight BO you won't be able to make assignments.
...although there isn't much detail, and since it's in the same realm as re-ordering and there is no more info on This and That.. one would assume that This and That apply here too. But clearly they don't. So how then, do we process a drop into another grid when we aren't getting both nodes in Context ?
V8.8 / Windows / MySQL
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Drag & Drop between Queries
Drag and drop between grids is supported provided that both queries search for objects of the same type.
If you cannot get this feature to work, please prepare a SMALL BSV illustrating what you want to do and send it to [email protected]
You will need to pay for a support ticket ($60 + GST). Let us know if you want to entertain this option and we will send you the invoice for the support ticket.
If you cannot get this feature to work, please prepare a SMALL BSV illustrating what you want to do and send it to [email protected]
You will need to pay for a support ticket ($60 + GST). Let us know if you want to entertain this option and we will send you the invoice for the support ticket.
Aware IM Support Team
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
From here
Freight can have One DeliverySlot
DeliverySlot can have Multiple Freight
You seem to be trying to move one item of Freight to another DeliverySlot. Drag between grids only works if both queries are the same. For example dragging Issue from Open to Closed grid.
I have no knowledge of your model but I am assuming that you have two objects Freight and DeliverySlotA record can be dragged from one grid represented by a standard query to another grid represented by some other standard query. Note that this will only work if both queries query on the same business object.
Freight can have One DeliverySlot
DeliverySlot can have Multiple Freight
You seem to be trying to move one item of Freight to another DeliverySlot. Drag between grids only works if both queries are the same. For example dragging Issue from Open to Closed grid.
Re: Drag & Drop between Queries
No, it's the same BO. and it's starting to give me BO.PointsWell wrote: ↑Tue Jan 31, 2023 3:26 am From here
You seem to be trying to move one item of Freight to another DeliverySlot. Drag between grids only works if both queries are the same. For example dragging Issue from Open to Closed grid.
And the example with issues isn't really applicable because that uses a Kanban board.
I'll just leave it and try again some other month, when again I think I've got more of a grasp of how it works in AI.
Thanks for your time.
V8.8 / Windows / MySQL
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Drag & Drop between Queries
No problem.
Have a think about what the conditions are for the query on the left and the query on the right.
Your initial post said:
To move a BO from the left query to the right query you are going to have to change an attribute on the query on the left to be equal to whatever the search condition is for the right.
Dragging from Query 1 to Query 2 to with the intention of making ThisFreight show up on Query2 would have to make ThisFreight.Delivered change from Yes to No. You could probably make it show anything that you want but it won't show up on Query2 until Freight.Delivered='No'
In your example you want to change to a specific TimeSlot_ID that is in the second query, but the query shows multiple TimeSlot_IDs. If you are trying to drop it onto a specific Freight BO and pick up that Freight BO's TimeSlot_ID, I don't think that is how the drag and drop functionality works.
Have a think about what the conditions are for the query on the left and the query on the right.
Your initial post said:
From your description these sound like these should be two different BOs (i.e. Header Record and Freight), otherwise you've got a heck of a lot of redundant data.The Left Query shows all the items of a certain TimeSlot_ID and the right Query shows a header record (no grouping or anything fancy), which there is one record for each different TimeSlot_ID. This is all the same BO, and basically the left query just filters out the headers, and the right query shows only the headers.
To move a BO from the left query to the right query you are going to have to change an attribute on the query on the left to be equal to whatever the search condition is for the right.
Code: Select all
Query 1 Query2
+------------------------+ +-----------------------+
|Freight.Delivered='Yes' | |Freight.Delivered='No' |
+------------------------+ +-----------------------+
|ThisFreight | -----> |ThatFreight |
+------------------------+ +-----------------------+
In your example you want to change to a specific TimeSlot_ID that is in the second query, but the query shows multiple TimeSlot_IDs. If you are trying to drop it onto a specific Freight BO and pick up that Freight BO's TimeSlot_ID, I don't think that is how the drag and drop functionality works.
Re: Drag & Drop between Queries
1. The original database is 2 BO's (or tables)... I disagree as far as redunant data.. I could actually do away with the timeslots table and basically have it all in one place... which would also allow for tree views. and not having to maintain 2 tables.PointsWell wrote: ↑Tue Jan 31, 2023 5:51 am
1...From your description these sound like these should be two different BOs (i.e. Header Record and Freight), otherwise you've got a heck of a lot of redundant data.
2... I don't think that is how the drag and drop functionality works.
2. It's a shame. It seems easy enough to implement... I mean if drag/drop re-ordering can pass both the Dragged item and the Target Item as This and That to the Process handling the drop, it couldn't be too hard to pass the same to the Process handling the drop on a different grid of the same BO.
I mean how many systems allow you to drop stuff even to a bin (as in waste paper basket) for eg, which is just an Icon, or a button, it couldn't be too difficult to drop to a node that already knows what it's supposed to be receiving.
Anyway. I'm Disappointed in drag drop. It's press useless if it only lets you change some attribute in the dragged item without having access to the target for any information it might need.
V8.8 / Windows / MySQL