cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the image of parent object based on collection within

Former Member
0 Kudos

Hi;

I am working on SAP Work Manager 6.0 customising using Agentry 6.1.3. I have an object InspectionOrder, that has a collection of InspectionPoints, which in turn has a collection of InspectionTasks. I am working on having the images of these objects updated on tile lists on the device. I am using the windows .NET client for testing. Currently I have managed to have the InspectionTasks image to change to completed once the required fields have been filled in, I am using rules here. I have archieved this as follows:

How can I possibly count the number of InspectionTasks with "Completed" image and compare this with the number of InspectionTasks in the collection, if the two are equal then this implies that all InspectionTasks within an InspectionPoint have been completed, and hence the InspectionPoint image must change to completed as well.

Thanks in advance.

Sizo Ndlovu

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

You can use the COUNT function against a collection.  You can also use selection criteria as a second parameter to COUNT to check the completed status:

IF

     EQNUM

          COUNT

               InspectionPoint Object -> InspectionTasks Collection

          COUNT

               InspectionPoint Object -> InspectionTasks Collection

                    EQSTR

                         InspectionTask Object -> Status property

                         COMPLETED

ImageComplete

ImageIncomplete

The above will compare the count of all tasks against the count of completed tasks and return the correct image name.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Awesome work Jason. Thanks!!

Answers (0)