Skip to main content
Solved

my tab view isnt loading with the master view


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>>>>))]

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

3 replies

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

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
darylbowman wrote:

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+13

You could try defining a constant:

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

        {

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

        }

 

Then:

[PXDefault(typeof(notAvailable))]


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