Skip to Content

Agentry: Problem counting collection with include criteria for collection displayed in list.

Hi Agentry Experts.

I am having a challenge that I cannot overcome in Agentry.

In Inventory Manager 4.2 you can download Reservations from the backend via a fetch, that will populate the Issues (object GoodsMovementDocument) collection of the MainObject.

The Object GoodsMovementDocument has two sub collections: Items of object Component and Issues of object MaterialDocumentItem.

The Screen Set IssueView is used to display TileLists for the Items and Issues collection in the right side of the screen, when the Issues screen of the MainScreen is displayed.

Each item in the Items collection is displayed via Screen Set: IssueComponentTile (which only has one screen: IssueComponentTile_iPhone ).

Now to the problem:

From the IssueComponentTile_iPhone screen I want to count elements in the collections Items and Issues of the current Component displayed in the TileList, and display it via an Update rule of a field in the Tile Screen. This works fine for the Issues collection but not for the Items collection. Please note that the Items collection is the one being displayed in the TileList, and I think this is the reason why it is not working. It seems Agentry cannot correctly determine the where clause, when it is regarding the same collection as the one being displayed.

The above rule is working for the Issues collection. Here the properties "material", "plant" and "storageLocation" refer to the fields of the Issues collection. The "Component" Object>fields are referencing the values of the corresponding fields of the current displayed object of the Component object in the TileList and the rule works as expected.

Now I want to count members of the same collection as is displayed (Items collection). Two attempts are displayed above. In the first I try to match the Material property in the same way as was done for the Issues collection, but this criteria always evaluates to true, hence returning the total number of entries in the Items collection.

In the second attempt, I try to separate the logic, and compare to a value that is not in conflict with the reference to the Component object. I save the value of Material in a screen field (ZZTestMaterial), and compare to this value. This evaluation always returns false, and hence gives me a count of zero always.

I cannot get it to return the number of entries with the same Material as the one being displayed in the list.

Can anybody help me ?


Søren Hansen

testrule.png (24.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers