Skip to main content
Solved

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


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

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

View original
Did this topic help you find an answer to your question?

2 replies

Hughes Beausejour
Acumatica Employee
Forum|alt.badge.img+2
  • Acumatica Developer Support Team
  • 91 replies
  • July 18, 2021

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.


  • Author
  • Varsity I
  • 32 replies
  • Answer
  • July 21, 2021

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings