How to convert colums to rows (pivot) and put the result in selector

  • 18 July 2021
  • 2 replies

Userlevel 2

Hello Goodnight. I have the following problem. I have a “table A” with the columns: Vendor_1, Vendor_2, Vendor_3 and Vendor_4. I need to display these columns in a selector as if they were rows.

In sql I solved the problem using "union all" but when I am investigating I see that acumatica does not have (or at least I have not found examples) this option.


  • Aditional: I have work in a customization project.

Can you help me please. Thanks!



Best answer by eddiedaco 21 July 2021, 06:21

View original

2 replies

Userlevel 5
Badge +2

Create alias DAC for each vendor to reference more than one vendor per query.


public partial class VendorR : Vendor
    #region BAccountID
    public new abstract class bAccountID : PX.Data.BQL.BqlInt.Field<bAccountID> { }

Then join each vendor in the same query.

Userlevel 2

Thanks for your answer @Hughes Beausejour . I resolve it creating a view in sql server, then create a dac with this view.


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2023  Acumatica, Inc. All rights reserved