AnsweredAssumed Answered

Script for current month & year Part II

Question asked by leonhart1981_1 on Dec 5, 2017
Latest reply on Dec 7, 2017 by BruceRobertson

Okay, I have successfully to create a script for current month & year using the Set Field command shown below:

 

Enter Find Mode [ Pause: off ]

Set Field [ Transaction::Date ;

Let (

m = Month ( Get ( CurrentDate ) ) ;

y = Year ( Get (CurrentDate ) ) ;

start = Date ( m ; 1 ; y ) ;

end = Date ( m+1 ; 0 ; y )

];

GetasText (start) & "..." & GetAsText (end)

)

 

Now, I would like to expand the script say if no record found in current month, then show transactions in previous month.

 

Could anyone help me out how do I make it work?

Outcomes