o
ZuluLog Sign In
OR
Forgot your password? Reset it now
Need an account? Sign up free
Remember me
Sign in
OR
Looking for an online, multi-user solution for your company?
Start here.
Sign In Using:
 
  Contact Us Sign In  
 
ZuluScript Functions
getfieldstr(string1)
Returns the string value of the field whose name is specified in string1. If the field does not exist for the given record, an empty string ("") is returned.
For fields of type checkbox, returns "false" or "true" depending on checkbox state.
For flight records, you can look up field values for associated aircraft definitions as well as flight fields.
Example:
	var route = getfieldstr("Route");
	
getfieldnum(string1)
Returns the numeric value of the field whose name is specified in string1. If the field does not exist for the given record, 0.0 is returned.
For fields of type checkbox, returns 0 or 1 depending on checkbox state.
For flight records, you can look up field values for associated aircraft definitions as well as flight fields.
Example:
	var flttime = getfieldnum("Day Flight Time") + getfieldnum("Night Flight
	Time");
	
getdaysago()
Returns the number of days between the record's date and today. For example, if a flight record's date is entered as June 7, and today is June 27 of the same year, this function would return 20 for that record. Example:
	var days = getdaysago();
	if (days < 30)
	{
	  // do something here
	}
	
strindex(string1, string2)
Returns the zero-based index of the first occurrence of string2 in string1. If string2 does not occur in string1, -1 is returned.
Example:
	var idx = strindex("Hello World", "llo");
	
returns 2.
strequal(string1, string2)
Tests the case-insensitive equality of string1 and string2. Returns 1 if the strings are equal, or 0 otherwise.
Example:
	var iseq = strequal("Hello World!", "HELLO World!");
	
returns 1.
Back to help index   Next article
 
Version 7.1.1.490
 
© 2024 ZuluLog LLC  All rights reserved Privacy | Terms of Use