Skip to main content
Answer

my tab view isnt loading with the master view

  • May 26, 2023
  • 3 replies
  • 96 views

abdallaahmed61
Varsity III
Forum|alt.badge.img+1

i have a problem with my tabs the default values isnt working with the tabs 

also the save isnt saving the views for the tabs it only saves the master values only

this is my screen 

 

and this is my tab dac

 

[PXCacheName("InspectionMalfunctionCheck")]
    [PXPrimaryGraph(typeof(InspectionFormEntry))]
    public class InspectionMalfunctionCheck : IBqlTable
    {
        #region malfunctionCheckID
        public abstract class malfunctionID : PX.Data.IBqlField
        {
        }
        protected int? _MalfunctionID;
        [PXDBIdentity(IsKey = true)]
        [PXUIField(Enabled = false)]
        public virtual int? MalfunctionID
        {
            get
            {
                return this._MalfunctionID;
            }
            set
            {
                this._MalfunctionID = value;
            }
        }
        #endregion

        #region InspectionNbr
        [PXDBString(20, InputMask = "")]
        [PXUIField(DisplayName = "Inspection Nbr")]
        [PXDBDefault(typeof(InspectionFormInq.inspectionFormNbr))]
        [PXParent(typeof(Select<InspectionFormInq,
                    Where<InspectionFormInq.inspectionFormNbr,
                    Equal<Current<InspectionFormInq.inspectionFormNbr>>>>))]
        public virtual string InspectionNbr { get; set; }
        public abstract class inspectionNbr : PX.Data.BQL.BqlString.Field<inspectionNbr> { }
        #endregion

        #region CarControlSysTest
        [PXDBString(1, InputMask = "")]
        [PXUIField(DisplayName = "أختبار نظام تحكم السيارة")]
        [PXDefault("N")]
        [PXStringList
            (
            new string[] { "G", "M", "B", "N" },
            new string[] { "Good", "Medium", "Bad", "N/A" }
            )
        ]
        public virtual string CarControlSysTest { get; set; }
        public abstract class carControlSysTest : PX.Data.BQL.BqlString.Field<carControlSysTest> { }
        #endregion
}

Best answer by darylbowman

The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]

3 replies

darylbowman
Captain II
Forum|alt.badge.img+15

The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]


abdallaahmed61
Varsity III
Forum|alt.badge.img+1

The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]

that was a terrible mistake :(

btw do you know why the 
        [PXDefault("N")]
not working ?


darylbowman
Captain II
Forum|alt.badge.img+15

You could try defining a constant:

public class notAvailable : PX.Data.BQL.BqlString.Constant<notAvailable>

        {

            public notAvailable() : base("N") { }

        }

 

Then:

[PXDefault(typeof(notAvailable))]