====IF==== ===Parameters=== ^Order^Name^Type^Desc^ |1|condition|any|The condition to determine if the //function// should be run| |2|truefunction|[[function|function]]|The function to execute if the //condition// is true| |3|falsefunction|[[function|function]]|The function to execute if the //condition// is false| ===Returns=== Copies the stack from the call onto the stack. ===Description=== This command runs the //truefunction// function if the //condition// is true. This command runs the //falsefunction// function if the //condition// is false. The condition is considered true in the following circumstances... ^Data Type^True If^ |[[const|const]]|'1', 'True', 'Yes','y','t'| |list or map|Contains more than 0 items| Note that the behaviour of [[fGET]] and [[fSET]] is slightly different when in the //if//. Calling **set** will only set a value for the nested function - you can't set values that will be accessible to the calling function. However, //GET// can access information stored by //any function in the calling hierarchy//. ===Example=== To demonstrate the function, let's look at a simple example. **'TE101' [[fASSET]] [[fRELS]] 'Location' [[fRELATIONSHIP]] [[fCONTAINS]] [ 'YES' ] [ 'NO' ] IF** This function will return 'Yes' if the asset TE101 is part of the Location hierarchy, or "No" if it isn't. ===See Also=== [[fCONTAINS]] \\ [[fEQUAL]] \\ [[fGREATER]] \\ [[fLESS]] \\