ZuluLog Sign In
Forgot your password? Reset it now
Need an account? Sign up free
Remember me
Sign in
Looking for an online, multi-user solution for your company?
Start here.
Sign In Using:
  Contact Us Sign In  
ZuluScript: Simple Currency Examples
Example: Solo Flight in Last 60 Days
Initialization script: None
Loop script:
	  if (getfieldnum("Solo") == 1)
	    currency_ok = 1;
How it works:
This simple script is executed for all your flights within the last 60 days (or whatever period you specify in the definition), working backwards from the most recent. The script checks if the "Solo" checkbox is turned on. If it is, the currency check is satisfied, and the expiration date will be 60 days (or as specified) from the date of the flight record that satisfied the currency.
Example: At Least 3 Instrument Approaches in 3 Calendar Months
Initialization script:
	  var dayapps = 0, ngtapps = 0;
Loop script:
	  dayapps = dayapps + getfieldnum("Day Inst Apps");
	  ngtapps = ngtapps + getfieldnum("Night Inst Apps");
	  if (dayapps + ngtapps >= 3)
	    currency_ok = 1;
How it works:
This is similar to the last example, except that we now also have two "counter" variables dayapps and ngtapps to keep running totals. For each flight record, we accumulate the number of approaches into the variables until we meet the required total, or run out of flights within the specified time period.
Back to help index   Next article
2024 ZuluLog LLC  All rights reserved Privacy | Terms of Use