Solved

I'm unable populate the data in the grid

  • 27 December 2023
  • 9 replies
  • 77 views

Userlevel 2
Badge

Hi Everyone,

I am unable to binding the data in grid, I don’t know what’s going on . 

Data view (Graph)

   [PXFilterable]

   public SelectFrom<FSEquipment>.

          InnerJoin<FSSODet>.On<FSSODet.SMequipmentID.IsEqual<FSEquipment.SMequipmentID>>.

          InnerJoin<FSServiceOrder>.On<FSServiceOrder.refNbr.IsEqual<FSSODet.refNbr>>.

          Where<FSSODet.refNbr.IsEqual<PYServiceEquipHistory.refNbr.FromCurrent>.

          And<FSSODet.SMequipmentID.IsEqual<PYServiceEquipHistory.equipmentID.FromCurrent>>>.

          OrderBy<FSServiceOrder.orderDate.Desc>.View ServiceEquipmentView;  

Where condition not working here..! 

Data available in the database

 When we select the both fields data adding into the grid but it’s not working.

Please help me on this issue.

Thanks

Nageswararao.

icon

Best answer by Naveen Boga 29 December 2023, 12:36

View original

9 replies

Userlevel 7
Badge +17

Hi @NageswaraRaoAddanki60  Are you getting the CURRENT value that you entered in the screen?

If you are not sure, then write a VIEW DELEGATE for this view and check, if you able to fetch the value so that you can able to identify the root cause for this issue.

Or, enable the request profiler, so that you can review the SQL query that is executing the background for that VIEW to know the root cause. 

Userlevel 2
Badge

Hi @NageswaraRaoAddanki60  Are you getting the CURRENT value that you entered in the screen?

If you are not sure, then write a VIEW DELEGATE for this view and check, if you able to fetch the value so that you can able to identify the root cause for this issue.

Or, enable the request profiler, so that you can review the SQL query that is executing the background for that VIEW to know the root cause. 

Hi Naveen ,thank you for your support.

I’ve tried to both scenario’s ,but it’s not work .

This is my  VIEW DELEGATE 

 

 public IEnumerable serviceEquipmentView()

 {

     Int32 totalrow = 0;

     Int32 startrow = PXView.StartRow;

     var bqlcommand = serviceequipmentview.view.bqlselect;

     // add group by

     var newcommand = bqlcommand.aggregatenew<

                     aggregate<

                         groupby<fssodet.smequipmentid>>>();

     // create your new select / view

     pxview select = new pxview(this, true, newcommand);

     // get your result as usual

     list<object> result = select.select(pxview.currents, pxview.parameters, pxview.searches,

         pxview.sortcolumns, pxview.descendings, pxview.filters, ref startrow, pxview.maximumrows, ref totalrow);

     return result;

 }

I used request profiler ,It will showing some error 

 

Presently what’s going on hear is , without any filters the data populated on the grid , with filters data not populated.

Userlevel 7
Badge +17

@NageswaraRaoAddanki60  Did you debug and check that the CURRENT value is properly fetching?

Userlevel 2
Badge

@NageswaraRaoAddanki60  Did you debug and check that the CURRENT value is properly fetching?

Yes @Naveen Boga  we are fetching both field’s data. 

 

Userlevel 7
Badge +17

@NageswaraRaoAddanki60  Something wrong!!

If possible, can you please share the customization package.

Userlevel 2
Badge

@NageswaraRaoAddanki60  Something wrong!!

If possible, can you please share the customization package.

Hi @Naveen Boga please find the below attachment.

Userlevel 7
Badge +17

@NageswaraRaoAddanki60  You shared the individual files and may not help to debug and identify the issue, however below are the observations. Please review and hope this helps.

 

  1. Data Type is not mentioned for the DAC fields
  2. I think GroupBy is not required, hence I commented it and written the another code for selector field.

 

  [Serializable]
        [PXCacheName("PYServiceEquipHistory")]
        public class PYServiceEquipHistory : IBqlTable
        { 
            #region RefNbr
            [PXString(15, IsUnicode = true)]
            [PXUIField(DisplayName = "Order Nbr.", Required = true)]
            [PXSelector(typeof(Search<FSServiceOrder.refNbr>))]
            public virtual string RefNbr { get; set; }
            public new abstract class refNbr : PX.Data.BQL.BqlString.Field<refNbr> { }

            #endregion

            #region SMEquipmentID

            [PXInt]
            [PXUIField(DisplayName = "Equipment ID", Required = true)]
            //[PXSelector(typeof(Search5<FSEquipment.SMequipmentID, InnerJoin<FSSODet, On<FSSODet.SMequipmentID, Equal<FSEquipment.SMequipmentID>>>,
            //    Aggregate<GroupBy<FSSODet.SMequipmentID>>>),
            //      typeof(FSEquipment.refNbr),
            //    SubstituteKey = typeof(FSEquipment.refNbr))]

        [PXSelector(typeof(Search<FSEquipment.SMequipmentID>),typeof(FSEquipment.refNbr),SubstituteKey = typeof(FSEquipment.refNbr))]
        public virtual int? EquipmentID { get; set; }
            public new abstract class equipmentID : PX.Data.BQL.BqlInt.Field<equipmentID> { }
            #endregion
        }

Userlevel 2
Badge

Thanks @Naveen Boga , that’s great work.

I’m simply adding attributes. Now, working fine.

[PXString(15, IsUnicode = true)]

[PXInt]

Userlevel 7
Badge +17

@NageswaraRaoAddanki60 Awesome. Thanks for sharing the update.

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