Other Functions

Previous  Terms  Next

TinkerPlots_logoV2-rgb


Other Functions

lookupValueByIndex

lookupValueByIndex("CollectionName", "AttributeName" , caseIndex) where the first two arguments are strings and refer to the name of another collection and the name of an attribute in that collection. The third argument is the index of a case in that collection. The result will be the value of the attribute for that case in the collection with that name.

Example: In a document that has a collection States, lookupValueByIndex("States", "Name", 3) would give "Arizona" as the result.

Note: This function does not update dynamically.  Thus, in the example, if the name of the third state were changed to "AZ", this would not be reflected as the result of the function until a recomputation were forced.

lookupValueByKey

lookupValueByKey("CollectionName" , "ReturnedAttrName", "KeyAttrName" , KeyValue) where the first argument is a string giving the name of a collection in the document. The second is a string giving the name of an attribute whose value is to be looked up in that collection. The third argument is a string giving the name of an attribute to be used as a "key" into the collection, and the fourth argument is the value to be matched with the key.

Example: lookupValueByKey("States", "Population", "State", "CA") would return 35000000, the result of looking up the population for California in a collection of states.

Note: This function does not update dynamically.


TinkerPlots Help

© 2012 Clifford Konold and Craig D. Miller