Skip to main content
Solved

I'm unable populate the data in the grid


Forum|alt.badge.img

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.

Best answer by Naveen Boga

@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
        }

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

9 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • December 27, 2023

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. 


Forum|alt.badge.img
Naveen Boga wrote:

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.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • December 28, 2023

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


Forum|alt.badge.img
Naveen Boga wrote:

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

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

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • December 29, 2023

@NageswaraRaoAddanki60  Something wrong!!

If possible, can you please share the customization package.


Forum|alt.badge.img
Naveen Boga wrote:

@NageswaraRaoAddanki60  Something wrong!!

If possible, can you please share the customization package.

Hi @Naveen Boga please find the below attachment.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • Answer
  • December 29, 2023

@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
        }


Forum|alt.badge.img

Thanks @Naveen Boga , that’s great work.

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

[PXString(15, IsUnicode = true)]

[PXInt]


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3381 replies
  • December 29, 2023

@NageswaraRaoAddanki60 Awesome. Thanks for sharing the update.


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