Dear Experts I tried to sort pending bill by date wise increasing but I could not success. Please help me [#Collection: Pending Bills] Sub Title: $$LocaleString:"Name", $$LocaleString:"Date", $$LocaleString:"Balance" Delete : Format FullHeight : Yes Add : Format : $$Name, 30 Add : Format : $BillDate, 10 : Universal Date Add : Format : $BaseClosing,12 : "AllSymbols, DrCr" Delete: Sort Sort: @@Increasing : $BillDate
Code is working, but pending bills are not sorting datewise. You can see the attached picture, where 14 Nov 2017 is coming after 5 Aug 2018. It should come at first.
Dear Amit Sir Sort: @@DateIncr : $BillDate also not working. I tried on release 4.93 and 5.3.8. I have attached a picture and my requirement.
Will not work in any version........ i think the dates are getting converted into strings within the collection. Same with amounts. In collections, all values become strings..........
try this (this will done finally) [#Collection: Pending Bills] Sub Title: $$LocaleString:"Name", $$LocaleString:"Date", $$LocaleString:"Balance", $$LocaleString:"Date Number" Delete : Format FullHeight : Yes Align : Right Add: Format : $$Name, 14 Add: Format : $BillDate, 8 : Universal Date Add: Format : $BaseClosing : "AllSymbols, DrCr" Add: Format : $FinalDateNumbers [system : formula] FormulaMonth : If $$MonthOfDate:$BillDate <=2 then $$MonthOfDate:$BillDate+13 else $$MonthOfDate:$BillDate+1 FormulaYear : If $$MonthOfDate:$BillDate <=2 then $$YearOfDate:$BillDate-1 else $$YearOfDate:$BillDate FormulaDay : $$DayOfDate:$BillDate FormulaDateToNum : (1461*$FormulaYear)/4+(153*$FormulaMonth)/5+$FormulaDay ;;;(146097*$FormulaYear)/400+(153*$FormulaMonth+8)/5+$FormulaDay FinalDateNumbers : $$Round:$FormulaDateToNum:1 [#Line: VCHBILL MainLine] Add : Field : Before : VCHBILL Name : VCHBILL NameTemp [Field : VCHBILL NameTemp] Use : Name field Set As : If not $$InCreateMode Then $$Table:VCHBILLNameTemp:$Name else $$Value Table : MyNewBillColl : $$InCreateMode Table : MyNewBillColl, BillRefBlankColl : not $$InCreateMode Show Table : Always Set Always : Yes Dynamic : "" Width : @@VCHShortNameWidth [#Field: VCHBILL Name] Set As : If not $$IsEmpty:#VCHBILLNameTemp then $$Table:VCHBILLNameTemp:$Name else $$ExclEvaluate:$$FnSetBillName [Collection : BillRefBlankColl] Title : "Blank" List Name : " " [Collection : MyNewBillColl] Use : Pending Bills Delete : Sub Title Add : Sub Title: $$LocaleString:"Date Number", $$LocaleString:"Name", $$LocaleString:"Date", $$LocaleString:"Balance" Delete : Format FullHeight : Yes Add : Format : $FinalDateNumbers, 10 ;;FinalDateNumbers, 10 Add : Format : $$Name, 14 Add : Format : $BillDate, 8 : Universal Date Add : Format : $BaseClosing : "AllSymbols, DrCr" Client Only : Yes Keep Source : ... Option : ShowBillFnlBlnc : ##VchShowBillFnlBlnc Delete : Sort Add : Sort : @@default : $FinalDateNumbers, $$Number:$Name [#Line: VCHBILL CTLineOne] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2 [#Line: VCHBILL CTLineTwo] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2 [#Line: VCHBILL CTLineThree] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2
try this (this will done finally) [#Collection: Pending Bills] Sub Title: $$LocaleString:"Name", $$LocaleString:"Date", $$LocaleString:"Balance", $$LocaleString:"Date Number" Delete : Format FullHeight : Yes Align : Right Add: Format : $$Name, 14 Add: Format : $BillDate, 8 : Universal Date Add: Format : $BaseClosing : "AllSymbols, DrCr" Add: Format : $FinalDateNumbers [system : formula] FormulaMonth : If $$MonthOfDate:$BillDate <=2 then $$MonthOfDate:$BillDate+13 else $$MonthOfDate:$BillDate+1 FormulaYear : If $$MonthOfDate:$BillDate <=2 then $$YearOfDate:$BillDate-1 else $$YearOfDate:$BillDate FormulaDay : $$DayOfDate:$BillDate FormulaDateToNum : (1461*$FormulaYear)/4+(153*$FormulaMonth)/5+$FormulaDay ;;;(146097*$FormulaYear)/400+(153*$FormulaMonth+8)/5+$FormulaDay FinalDateNumbers : $$Round:$FormulaDateToNum:1 [#Line: VCHBILL MainLine] Add : Field : Before : VCHBILL Name : VCHBILL NameTemp [Field : VCHBILL NameTemp] Use : Name field Set As : If not $$InCreateMode Then $$Table:VCHBILLNameTemp:$Name else $$Value Table : MyNewBillColl : $$InCreateMode Table : MyNewBillColl, BillRefBlankColl : not $$InCreateMode Show Table : Always Set Always : Yes Dynamic : "" Width : @@VCHShortNameWidth [#Field: VCHBILL Name] Set As : If not $$IsEmpty:#VCHBILLNameTemp then $$Table:VCHBILLNameTemp:$Name else $$ExclEvaluate:$$FnSetBillName [Collection : BillRefBlankColl] Title : "Blank" List Name : " " [Collection : MyNewBillColl] Use : Pending Bills Delete : Sub Title Add : Sub Title: $$LocaleString:"Date Number", $$LocaleString:"Name", $$LocaleString:"Date", $$LocaleString:"Balance" Delete : Format FullHeight : Yes Add : Format : $FinalDateNumbers, 10 ;;FinalDateNumbers, 10 Add : Format : $$Name, 14 Add : Format : $BillDate, 8 : Universal Date Add : Format : $BaseClosing : "AllSymbols, DrCr" Client Only : Yes Keep Source : ... Option : ShowBillFnlBlnc : ##VchShowBillFnlBlnc Delete : Sort Add : Sort : @@default : $FinalDateNumbers, $$Number:$Name [#Line: VCHBILL CTLineOne] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2 [#Line: VCHBILL CTLineTwo] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2 [#Line: VCHBILL CTLineThree] Local : Field : VCH ShortTitle : Width : @@VCHShortNameWidth*2