cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry Action to act on previously selected object on tile list

Former Member
0 Kudos

Hi;

I am working on SAP Work Manager 6.0 customising using Agentry 6.1.3. I am using the windows .NET client for tesing the development machine and having the application deployed to an android 4.0.4 device. I have a tile list which display items on the left pane and their respective collection items on the right pane, so when an item is always selected on the left pane, the item's collection is displayed on the right pane. On the right pane, I also have embedded image buttons, whose actions target the selected item on the left pane, these are start, pause and complete buttons. Currently it all works fine, the selected item on the left pane can have the start time and pause time stamped, this would be by clicking on the appropriate button. Please advise as to how I would achieve the following in Agentry: I would like to implement this start and pause mechanism in a manner that when a user selects a particular item on the left pane, they can click the start button to have the time started, but it must automatically go on pause when a different item is selected on the left pane. I would very much appreciate your input.

Thanks in advance!

Regards;

Sizo Ndlovu

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

You would need to loop over the main collection in a sub-action, looking for any started records in your execution rule that do not match the record they just clicked on the right pane.  The sub-action that this loop would execute has a transaction that puts the current record in pause status.

This is the opposite way that our products work though.  Usually, we force the user to put the started record on pause manually by hand first.  Then they can start another record.  We have enable rules on the start button that wont enable it if the COUNT of records > 0 with a status of "started".

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason;

I have created an action that contains the looping action and an execution rule that check first if the current record is started and whether or not its equal to the one currently selected, I have done this on the start button, but somehow, the Inspection Point starts but the previous one that was started does not get paused, please kindly see below how I have implemented this:

The InspectionPointLoopStep is the Looping subaction with the execution rule to check for a started point and pause it if its not the currently selected one.

The InspectionPointTimeConfirmationStep2 is the transaction step with the transaction that contains the update step.

The subaction step definition:

The execution rule to select the started record that is not the current selected one:

The Pause action:

The Start action:

I can still start and pause a particular selected inspection point, but when i select a different one, the one I am coming from does not get paused. Please advise as to how I come be doing this wrong.

Thanks and Regards;

Sizo Ndlovu

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Sizo,

In looking at your Start action I don't see where it is calling your AutomatedInspectionPointPause action?

If the automated pause is the first step in the start action, then you can simply loop over all the points and pause any that are already started.  You don't need to compare it to the current object since it won't have been started yet.  Simply loop over the points and pause any in a started status.  This will simplify your rule.

As a secondary note, you may have an issue (not positive) with trying to compare the currently selected point to the inspection object.  I am not sure how if the context is maintained as you would expect but if you simply the rule it won't matter.

Also when using the AND rule term it is expecting two or more arguments that each evaluate to true or false.   You don't need the second AND rule term.

--Bill

Former Member
0 Kudos

Hi Bill;

Thank you for the response. I have simplified the rule as you have pointed, with no success yet in getting this to work, it simply does not pause the other started point. Please see below:

Please advise?

Thanks and Regards;

Sizo Ndlovu

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

Bill is correct that you should just set any 'started' to 'paused' first, rather than the check for current that I suggested.

I see that you are looping over displayed list items.  You shouldn't do that.  Just loop over the full collection.  The way you have it now, it will start the loop from the selected item and skip the others above it.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Thank you guys, you help is very much appreciated!! I finally got this working

Regards;

Sizo Ndlovu

Answers (1)

Answers (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Sizo,

One way to implement this would be to store the current item id in a temporary property on your main object when you start it.  Then you could implement a Single Click Action on your tile list which compares the currently selected item id with that main object property and if different pause the id in the main object property.

--Bill