When coding a meta-condition of "+Case...+When" that queries for any triple with a source object type of "FNC" (function) inside of an internal function, the triples for the external function that call the internal function are not being queried. It only queries the FNC triples of the internal function. How can a reusable internal function be coded so that it queries the triples of the external function that is calling it?
CA Plex all versions
When a meta-condition of "+Case...+When" that queries for any triple with a source object type of "FNC) is placed inside of a function of type "Internal", the internal function becomes the "Current" function. This means that it will always query triples for the internal function rather than for the external function that makes a call to the internal function.
In order to create a reusable function that queries triples for the external (calling) function, you will need to make the reusable function a function of type "Meta". Any code that you place inside of a function of type "Meta" becomes "in-line" code inside of the calling function. This means that the "Current" function will always be the external (calling) function. This allows you to write meta-code to query all triples where the source object is of type "FNC" and it will always pick up the triples for the external (calling) function rather than for the Meta function.