cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry search in a Object Collection

Former Member
0 Kudos

Hello,

i have a parent object "order" this have a object collection "orderItems". Every orderItem have a attribute "status" which can be open our close.

Now i need to combine the status from the orderItems to the orderStatus and show this on a detailscreen label.

  • If one orderItem status is open, the status from the order should be open too.
  • If all orderItems from one order have the status closed the oderStatus is closed.

I know i can create a rule with collection_find_by_str but the rule dose not do what i want.

Could someone explain me how i can use the collection_find_by_str correct or how i can search in a collection for special attribute.

Thanx André

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Andre,

Here is an example:

This rule will search the WorkOrders Collection looking for an EquipmentID matching the target stored in TempHeader.  TYPE will return TRUE if a record is found.  Think of the TYPE function as a "Where Exists" target check.  It will return True if the target is found, and False if not.

I will also create a blog with some other similar tips from an old document I wrote a while back.  I'll link it here when finished.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Thanx Jason,

the hint with the Type did it in my case. I created this rule:

Former Member
0 Kudos

Hi,

I have the same problem.

In equipment object I have a custom property as ZBARCODE. In this property, I scan a barcode value and it must be unique as EquipmentID. Because of the fact that in EquipmentEditForAdd transaction, key property is EquipmentID, I need to create a control for ZBARCODE value uniqueness on offline mode. I mean, I have a control for equipments which were transmitted to ERP side (so they are in ctEquipment complex table). But in offline mode, while I am adding equipment, I need to check every equipment barcode value but they are not stored in complex table until transmission.

So I created a validation rule in EquipmentEditForAdd, here is the structure.

I tried the EquipmentWorkList because I check my settings on blackberry platform, it is easy was for me for checking transaction and object values. I noticed that when I add an equipment, it apeears in EquipmentWorkList property as below:

Could you please help me?

Best regards,

Mina

Former Member
0 Kudos

Dear Mina,

i can not see in your rule picture the search property. The collection find by string function should hvae 3 parameters first is the collection, second the search string and third the property from the collection in where you will search fore.

In your case the equipmentWorkList have the child propertys equipment and each equipment have a property where the barcode is stored?

Then you have to do the collection find by string so:

collection property:  equipmentWorkList

search string: ZBARCODE property (is the transaction value or the last scanvalue if you scan the barcode)

search property: the barcode Property from the equipment object.


Can you try this?


Maybe i could help you,

André

Answers (0)