Dear All, I have made a tdl in which have given Entered by & Altered by. But am not able to get latest altered user name. Kindly Help. [#Line: DSP UserName] Add : Fields : EntBy Add : Fields : AltBy [Field : EntBy] Use : Name Field SetAs : $VCHCreatUser [Field : AltBy] Use : Name Field SetAs : $VCHAlterUser [Line : DSPCreatBy] Field : DSPCreatBy [Field : DSPCreatBy] Use : Name Field SetAs : $VCHCreatUser Width : 8% Page Border : Thin Left Style : Small Invisible : NOT ##ShowcreatBy [Line : DSPAltrBy] Field : DSPAltrBy [Field : DSPAltrBy] Use : Name Field SetAs : $VCHAlterUser Width : 8% Page Border : Thin Left Style : Small Invisible : NOT ##ShowAltrBy ;;[#Part: DYBKCFG Common] ;; Delete : Line : ShowCreatedBy ;; Add : Line : ShowcreatBy ;; Add : Line : ShowAltrBy [#Part: CMP COLBasics] Add : Line:AtEnd: ShowAltrBy Add : Line:Before: ShowAltrBy : ShowCreatBy [Line: ShowCreatBy] Fields : Medium Prompt,ShowcreatBy Local : Field : Medium Prompt : Info : $$LocaleString:"Show Entered By ?" [Field : ShowcreatBy] Use : Logical Field Modifies : ShowcreatBy [Line: ShowAltrBy] Fields : Medium Prompt, ShowAltrBy Local : Field : Medium Prompt : Info : $$LocaleString:"Show Altered By ?" [Field : ShowAltrBy] Use : Logical Field Modifies : ShowAltrBy [Variable: ShowcreatBy] Type : Logical Persistent : Yes [System : Variable] ShowcreatBy:"" [Variable: ShowAltrBy] Type : Logical Persistent : Yes [System : Variable] ShowAltrBy:"" [System : UDF] GRVchAlterHistory : Aggregate : 6002 VCHAlterUser : String : 6003 VCHCreatUser : string : 6004 CurUser : String : 6005 [#Line : DSP ColVchTitle] Add : Fields : After : DBC VchNo : DSPCreatBy Local : Field : Default : Style : Small Italic Local : Field : DSPCreatBy : Set As : "Entered By." Add : Fields : After : CreatBy : DSPAltrBy Local : Field : Default : Style : Small Italic Local : Field : DSPAltrBy : Set As : "Altered By." [#Line : DSP ColVchDetail] Add : Fields : After : DBC VchNo : DSPCreatBy Add : Fields : After : DSPCreatBy : DSPAltrBy [#Line : DSP ColVchTotal] Add : Fields : After : DBC VchNo : DSPCreatBy Local : Field : DSPCreatBy : Set As : "" Add : Fields : After : DSPCreatBy : DSPAltrBy Local : Field : DSPAltrBy : Set As : "" [#Part : VCHNarration] ;;Option : SalesUser : @@Issales ;;[!Part : SalesUser] Add : Line : CreatBy, AltrBy [Line : CreatBy] Field : CreatBy [Field : CreatBy] Use : Name Field Type : String : Forced Storage : VCHCreatUser Set as : $$StringMyvalue Set always : yes ;; invisible : yes Myvalue : if $$InCreateMode then ##SVuserName else $VCHCreatUser Background : red [Line : AltrBy] Field : CndAltrBy [Field : CndAltrBy] Option : AltrBy : $$InAlterMode [!Field : AltrBy] Use : Name Field set as : @@OnlyUserName Storage : VCHAlterUser : GRVchAlterHistory : end : 1 Validate : not $$isempty:$$Value Set Always : Yes ;; Set As : $$LocaleString:##SVuserName ;; MyValue1 : if $$InAlterMode then $CurUser else " " inactive : $$InCreateMode ;; invisible : yes Background : yellow [System : Formula] OnlyUserName : if $$InAlterMode then ##SVuserName else "Not Altered" [#Collection : Columnar Filtered Vouchers of Company] Fetch : VCHCreatUser Fetch : VCHAlterUser [#Collection: Columnar Vouchers of Ledgers] Fetch : VCHCreatUser Fetch : VCHAlterUser [#Collection: Columnar Daybook Vouchers of Company] Fetch : VCHCreatUser Fetch : VCHAlterUser [#Collection: Ledger Vouchers Coll] Fetch : VCHCreatUser Fetch : VCHAlterUser [#Collection: Daybook Vouchers of Company] Fetch : VCHCreatUser Fetch : VCHAlterUser [#Collection: DBVoucher SRC] Fetch : VCHCreatUser Fetch : VCHAlterUser
This is the field [!Field : AltrBy] Use : Name Field set as : @@OnlyUserName Storage : VCHAlterUser : GRVchAlterHistory : end : 1 Validate : not $$isempty:$$Value Set Always : Yes ;; Set As : $$LocaleString:##SVuserName ;; MyValue1 : if $$InAlterMode then $CurUser else " " inactive : $$InCreateMode ;; invisible : yes Background : yellow
Try This [!Field : AltrBy] Type : String : Forced ;;Use : Name Field set as : @@OnlyUserName Storage : VCHAlterUser : GRVchAlterHistory : end : 1 Validate : not $$isempty:$$Value Set Always : Yes ;; Set As : $$LocaleString:##SVuserName ;; MyValue1 : if $$InAlterMode then $CurUser else " " inactive : $$InCreateMode ;; invisible : yes Background : yellow
taufeeq, the code had saving issues. like, it was making separate udf instances, instead of having all of them being in single instance of GRVchAlterHistory. pls find attached, the modified file.
hello Aldrin sir, i want solution for this things... sir i want to display two user defined field multiplication values in existing field "Quantity" that user defined field values type is "Number" and i want simple generate the value in existing field in number only... i dont want any actualqty or billedqty and any other ... i want just udf multiplication value generate in existing field "Quantity.... plz sir help me out this probelm...." i attech the txt file