FoodEngFAAB Posted August 24, 2023 Share Posted August 24, 2023 Hello everyone: I am modeling a packaging system by means of a combiner. 12 equal members are grouped in a box (parent). Before leaving the respective source, members are assigned a value (0, 1, 2) as a state variable (ESV_P) to distinguish them by product type. I want the box to have the value of the products state variable. For example, if the box contains 12 type 1 products, the box should be assigned with a state variable ESV_B equal to 1. Any suggestions? Best regards. Link to comment Share on other sites More sharing options...
jzhou Posted August 24, 2023 Share Posted August 24, 2023 kindly refer to the attached model. cheers Model_recordbatchmembersAttributetoParentObject.spfx Link to comment Share on other sites More sharing options...
FoodEngFAAB Posted August 24, 2023 Author Share Posted August 24, 2023 Thank you so much: I tried the same setup but it doesn't work like in your model. It could be another problem that I don't see. Kind regards Link to comment Share on other sites More sharing options...
MauricioBiolato Posted August 25, 2023 Share Posted August 25, 2023 Hi Fabian, I see two (or more) possible alternatives for solving this. Assuming that the box only receives one type of entity you can: 1. Create a state variable (for example st_CurrentBoxType) and every time an entity enters the combiner you assign the entity type to this state variable. This way, one the box is completed and exits the combiner you will be able to assign it the st_CurrentBoxType. 2. The other way is to execute a search step once the box is full. You can use "ModelEntity.BatchMembers.FirstItem" as match condition to locate the first batched entity, then in the found branch use an assing step to assign the ProdType from the found entity I'm sure there are a lot of ways of doing that... hope this helps saludos Link to comment Share on other sites More sharing options...
Recommended Posts