Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Inventory Details sequence number -Solved-
#3
(06-19-2020, 09:20 AM)joebordes Wrote: I understand that you are saying:

- the order of the master-detail inventory module is correctly managed
- the sequence number (thus the order) of the inventory details records related to the inventory module record is updated and managed correctly
- the issue is that the GenDoc foreach loop is retrieving the inventory details record in database order and not sequence field order

so there is really no problem in the code, but in the limitation of GenDoc foreach loop to get the records in a given order.

(that is why you say "i think if it is even possible")

If the above is correct try adding the "sort" directive in the GenDoc foreach

{foreach InventoryDetails *sequence ASC*}

https://github.com/tsolucio/corebos/pull/710

Let me know how it goes
Perfect! It works indeed. I knew you can put some field conditions on the loop, but i did not noticed it can also sort. That's just fantastic Wink.
And your assessment was spot on! My initial thoughts were that it was something to be used like that since there was nothing wrong in the code or databases, just an expected behavior given the nature of the loop scan... but the option to sort is already there. In fact, that addition plus what was already in there makes that loop very powerful now.

Thanks alot!
Reply


Messages In This Thread
RE: Inventory Details sequence number - radu - 06-19-2020, 10:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)