I’m trying to create two pxformula attribued on a DAC.
#region UpcomingCycleID
[PXInt]
[PXUIField(DisplayName = "Upcoming Cycle ID", Enabled = false)]
[PXFormula(
typeof(Search<
CycleDetail.cycleID,
Where<
CycleDetail.cycleMajor, Equal<Current<SeriesDetail.cycleMajor>>,
And<CycleDetail.cycleMinor, Equal<Current<SeriesDetail.cycleMinor>>,
And<CycleDetail.date, Greater<Current<AccessInfo.businessDate>>>>>>
))]
public virtual int? UpcomingCycleID { get; set; }
public abstract class upcomingCycleID : PX.Data.BQL.BqlInt.Field<upcomingCycleID> { }
#endregion
#region UpcomingCycleDate
[PXDate]
[PXUIField(DisplayName = "Upcoming Cycle Date", Enabled = false)]
[PXDependsOnFields(typeof(SeriesDetail.cycleMajor), typeof(SeriesDetail.cycleMinor))]
[PXFormula(
typeof(Search<
CycleDetail.date,
Where<
CycleDetail.cycleMajor, Equal<Current<SeriesDetail.cycleMajor>>,
And<CycleDetail.cycleMinor, Equal<Current<SeriesDetail.cycleMinor>>,
And<CycleDetail.date, Greater<AccessInfo.businessDate.FromCurrent>>>>,
OrderBy<Asc<CycleDetail.date>>>)
)]
public virtual DateTime? UpcomingCycleDate { get; set; }
public abstract class upcomingCycleDate : PX.Data.BQL.BqlDateTime.Field<upcomingCycleDate> { }
#endregionCycleMajor and CycleMinor are a strings on the CycleDetailDAC.
I want these fields to be calculated on demand, hence the PXint and PXDate as opposed to PXDBInt etc.
But these aren’t being populated on the screen when I fill it in and they aren’t being populated in a generic inquiry.
I don’t even see the sql that’s would be from these two pxformula’s?
It’s just blank.