Skip to Content
author's profile photo Former Member
Former Member

Changing the image of parent object based on collection within

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

ImageRule.png (28.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 22, 2014 at 06:14 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.