Jump to content

Search member in batch with lowest value for state variable


Christa

Recommended Posts

In the batch that was created, I want to search the member entity with the lowest value for state variable "NumberOfRollContainers" and change its value to: <<TotalREQ" - 0.9 * "CapacityTrip">>, where "TotalREQ" and "CapacityTrip" are state variables of the parent entity.

I am struggling with how to use the search step in this situation, so help is appreciated. Thanks in advance! :)

Link to comment
Share on other sites

After being sure that you have at least one member entity (you can check this by using a decide step or an auxiliary expression within the search step). Then, set search steps match condition property as "Math.Min(xxx.NumberOfRollContainers)". And, place an assign step at "found" branch of search step. At this step you can change its value.

Link to comment
Share on other sites

1 hour ago, Christa said:

In the batch that was created, I want to search the member entity with the lowest value for state variable "NumberOfRollContainers" and change its value to: <<TotalREQ" - 0.9 * "CapacityTrip">>, where "TotalREQ" and "CapacityTrip" are state variables of the parent entity.

I am struggling with how to use the search step in this situation, so help is appreciated. Thanks in advance! :)

Kindly check the attached model for how to search the lowest value , kindly note the lowest value maybe more than 1, so I first search out the lowest value and check again if there is many copies of the lowest value.....                    all the best!  →→→→❤

Model_totalRollContainer_JZ(2).spfx

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...