Solved

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

  • 18 July 2021
  • 2 replies
  • 25 views

Userlevel 1

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!

 

icon

Best answer by eddiedaco 21 July 2021, 06:21

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

View original

2 replies

Userlevel 4

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

Example:

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

Then join each vendor in the same query.

Userlevel 1

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

Reply


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 — 2020  Acumatica, Inc. All rights reserved