Dear expert, Generally all adl developer used a function to deactivate the tcp after a particular time . I am also using this formula but not working. LET ME KNOW IS THERE IS ANY MISTAKE IN FORMULA. CUSTVALIDDATE: "08-MAR-2024" THANKS & REGARDS RISHI
You can write a Function - you can use your logic as required. pls find sample code.. Dont just copy paste.. ========================================================================== ;;Syntax : "Inactive : $$DateLock" ;;Explanation : if $$Datelock function returns "yes" then inactive is "yes" else "No" ;;Purpose : ; In default Tally developer date lock option provided. But client can be easily identified if the program is locked with datelock protection. ; Then the client can change the sytemdate then the datelock removes and works fine in default option. ;In this program Advantages: ; * Client can't be identified the datelock protection. ; * When client change the system date can't affect the protection.It's locked after the detelock period. ; * you can simply modify the program Variable TEMPDATE as Parameter then you can assign datelock from the parameter. [FunctionateLock] Static Variable : TAR_DATE : Date : $$MachineDate Variable : TEMPDATE : Date $$Date:"08/06/2024") Variable : Validdate: Logical Return : Logical 00 : if : ##TAR_DATE <= $$MachineDate 10 : SET : TAR_DATE : $$MachineDate 20 : END IF v00: If: ##ValidDate = "yes" v01: Return: Yes V02: Else 30 : if : ##TAR_DATE > ##TEMPDATE V03: Set: ValidDate: "yes" 40 : RETURN : YES 50 : ELSE V04: Set: Validate: "No" 60 : RETURN : NO 70 : END IF V05: End If
very easy method here [System:Formula] MyFromDate : $$Date:"08-03-2024" MyToDate : $$Date:"20-03-2024" MyDateLock : $$MachineDate Between @@MyFromDate And @@MyToDate