o
Secure Sign in
Save login on this device
Log in
Forgot your password?
Don't have an account? Create one now.
 
Contact Us     Sign In
 
Online Pilot Logbook | Professional Aviation Record Keeping™
 
 
ZuluScript: Intermediate Currency Examples
Example: Flight as Examiner at KSRQ in Last 12 Calendar Months
Initialization script: None (we don't need totals across flights)
Loop script:
	  var crew_role = getfieldstr("Crew Role");
	  var route = getfieldstr("Route");
	
	  if (strequal(crew_role, "Examiner") && 
	      strindex(route, "KSRQ") >= 0)
	    currency_ok = 1;
	
How it works:
The && operator means "and", as in "Crew Role must be Examiner AND Route must contain KSRQ". By contrast, the || operator means OR, which means that either check would be enough to satisfy the currency.
Note that we're using getfieldstr instead of getfieldnum because we're checking text values here, not numeric values.
strequal checks for text strings being equal, and strindex returns the place that the specified substring ("KSRQ") appears in the larger string (route). It's zero-based, so it will return 0 (not 1) if the substring appears at the very beginning. If the substring does not appear it will return -1.
The variable names crew_role and route are arbitrary and can be called whatever you'd like. However, the string "Examiner" must be spelled and capitalized exactly as it appears in the Role drop-down menu on the Flight Entry screen.
Example: Flight Review in Robinson R22
Initialization script: None (we don't need totals across flights)
Loop script:
	  var fltrev = getfieldstr("Flight Review");
	  var actype = getfieldstr("ICAO Code");
	
	  if (strequal(fltrev, "Flight Review") && strequal(actype, "R22"))
	    currency_ok = 1; 
	
How it works:
We put the value of the Flight Review drop-down into fltrev and the value of the ICAO Code field (from the corresponding aircraft definition) into actype. If the flight was a Flight Review and the aircraft's ICAO code was R22, then this must be a flight review in a R22, and our currency is valid, assuming we selected the correct period for the currency definition.
Back to help index   Next article
 
Version 7.1.1.393
 
2019 ZuluLog LLC  All rights reserved Privacy | Terms of Use