on 07-07-2017 6:59 PM
I'm trying to develop a screen that allows the user to move the orders up or down with corresponding buttons. Eventually I'll concatenate the current sort key into the sort key using the mid formula to change the appearance on the main page. I'm having 3 issues:
1) When attempting to SUM(Global Variable{1} with Current property) it concatenates them. So SUM(1 and 0) becomes 10 not 1. So image below shows 1110, which was 3 up clicks.
2) Selecting the row and clicking a button event doesn't adjust the selected row where the action targeted the current screen's list view's current object. I clicked up with the first row selected and it affected the fifth row's value. Currently using this link to see how to adjust:
https://archive.sap.com/discussions/thread/3548428.
3) Is there an easy way to get the index position value using Agentry to establish the current sort order field value?
Thank you,
Brad
1) I would guess that your values are strings. When SUM works with strings it is equivalent to CONCATENATE. If you want mathematical SUM you will need to make sure your parameters are a numeric type. You can use FROM_INTEGRAL_NUMBER to set the context of the parameters to numbers so SUM should then return the result you expect.
3) No there isn't a way to get a position value from Agentry since it is dynamic based on the sorting applied to the list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for taking a look, Bill.
Can a temporary counter be added that'd simply increment by 1 each time through the loop and update the current sort order/position for each row which I can fix sort and accomplish the same goal? The collection I'm pulling these records from is sorted within the correct order. User sorting will be disabled, but user may increment/decrement current sort order/position by 1 with the corresponding up/down buttons.Currently it's just adding one to each row instead of i++.
I've attached screenshots below of what I currently have.
Sub action of an action that was directed to after main screen drop down event click. After this sub action is a navigation action to the Sort MOM Orders.
Transaction within the sub action followed by apply.
Transaction property to change
Rule to increment the current sort order/position by 1.
Thanks,
Brad
I believe any new objects get added to the end of the collection. Any sorting is done at the UI layer not the underlying collection.
I am not totally following how your are intending to sort the list to allow the movement of the items but it should just entail knowing the old value, and iterating over the list to increment everything greater than the old value that isn't the object you updated to make room for the selected object to be updated.
--Bill
I'm mainly seeing if Agentry can take a previously sorted Order collection based on sortkey on the Main Screen and using the position of those items and pulling that data into the Sort Screen. So when I increment the count, as I iterate through each order in the collection, it'll match the position of that order found on the Main Screen. When the user is on the Sort Screen and clicks up, it'll change the count/CurrentSortPosition value on the screen directly allowing for a dynamic sort. I have the logic set up except the underlying Order collection object is being pulled in rather than the index position of that Order object listed on the Main Screen.
Main Screeen list sorted on ascending Sortkey: Sortkey -123 (underlying position 2), Sortkey - 456 (underlying position 1), Sortkey - 789 (underlying position 3)
Current Sort Screen view sorted on Count: Sortkey - 456 Count 1, Sortkey - 123 Count 2, Sortkey - 789 Count 3
Ideal Sort Screen view sorted on Count: Sortkey - 123 Count 1, Sortkey - 456 Count 2, Sortkey - 789 Count 3
Thanks,
Brad
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.