cancel
Showing results for
Did you mean:
New Member

Ideas please! How to assign items in a list a parcel reference based on their collective value.

Hello All,

I'm after some ideas please. I have a SP List which contains orders created on any given day. The orders range in value from £200 - £1000. When I post the orders, I need to group them in to parcels, the maximum parcel value can be £2500. I do this grouping activity once at the end of the day, currently this sends me an email with a HTML table using the Get Items step with an appropriate odata filter for date.

Therefore I need a way to assign the orders to a parcel number based on their combined value. Ideally I don't want any wasted space in a parcel, it is important to get as close to £2500 as possible to reduce postage costs.

Ideas so far:

When a list item is written, get the value of the previous items and add them together. Apply a condition, if the value of the new item and previous items with the same parcel reference number is less than £2500, give the same parcel reference number (the reference will simply be 1, 2, 3 etc, unique to that day). If the value of all items plus the new item is greater than £2500, give a new reference number of parcel reference+1.

Therefore each time it would be looking at the parcel so far, considering the value, and either adding an item in to the parcel or starting a new one.

This does not calculate the optimum assignments, it only considers the order in which they are sold, not the overall best way.

Even with this approach I will have a few challenges, such as using sums in Power Automate (with decimal points I have always ran in to issues), getting the reference number and having a counter method that increases the reference number (I think I can manage this).

Another idea is to have a staging spreadsheet, where I can use the formula function of excel which is more versatile. Have Power Automate write a formula to Excel, some sort of countif, or sumif value. Again, I can't think of what exactly is best.

Any ideas would be appreciated!

0 REPLIES 0

Announcements

Announcing | Super Users - 2023 Season 1

Super Users – 2023 Season 1    We are excited to kick off the Power Users Super User Program for 2023 - Season 1.  The Power Platform Super Users have done an amazing job in keeping the Power Platform communities helpful, accurate and responsive. We would like to send these amazing folks a big THANK YOU for their efforts.      Super User Season 1 | Contributions July 1, 2022 – December 31, 2022  Super User Season 2 | Contributions January 1, 2023 – June 30, 2023    Curious what a Super User is? Super Users are especially active community members who are eager to help others with their community questions. There are 2 Super User seasons in a year, and we monitor the community for new potential Super Users at the end of each season. Super Users are recognized in the community with both a rank name and icon next to their username, and a seasonal badge on their profile.    Power Apps  Power Automate  Power Virtual Agents  Power Pages  Pstork1*  Pstork1*  Pstork1*  OliverRodrigues  BCBuizer  Expiscornovus*  Expiscornovus*  ragavanrajan  AhmedSalih  grantjenkins  renatoromao    Mira_Ghaly*  Mira_Ghaly*      Sundeep_Malik*  Sundeep_Malik*      SudeepGhatakNZ*  SudeepGhatakNZ*      StretchFredrik*  StretchFredrik*      365-Assist*  365-Assist*      cha_cha  ekarim2020      timl  Hardesh15      iAm_ManCat  annajhaveri      SebS  Rhiassuring      LaurensM  abm      TheRobRush  Ankesh_49      WiZey  lbendlin      Nogueira1306  Kaif_Siddique      victorcp  RobElliott      dpoggemann  srduval      SBax  CFernandes      Roverandom  schwibach      Akser  CraigStewart      PowerRanger  MichaelAnnis      subsguts  David_MA      EricRegnier  edgonzales      zmansuri  GeorgiosG      ChrisPiasecki  ryule      AmDev  fchopo      phipps0218  tom_riha      theapurva  takolota     Akash17  momlo     BCLS776  Shuvam-rpa     rampprakash   ScottShearer     Rusk   ChristianAbata     cchannon   Koen5     a33ik        AaronKnox        Matren        Alex_10        Jeff_Thorpe        poweractivate        Ramole        DianaBirkelbach        DavidZoon        AJ_Z        PriyankaGeethik        BrianS        StalinPonnusamy        HamidBee        CNT        Anonymous_Hippo        Anchov        KeithAtherton        alaabitar        Tolu_Victor        KRider        sperry1625        IPC_ahaas      zuurg     rubin_boer     cwebb365       If an * is at the end of a user's name this means they are a Multi Super User, in more than one community. Please note this is not the final list, as we are pending a few acceptances.  Once they are received the list will be updated.