Calling Another Interaction Via A Fetch


Calling Another Interaction Via A Fetch


Description #

There are times when you need to call an answerspace internally. This can be done via a Fetch command in mADL An internal call to GetAnswer.php along with the parameters will return the called interactions values.

Parameters # 

asn= the answerspace
iact= the interaction 

Return values#

Returns requested source into $t->result 

Examples # 

return $t->result;

This example calls the interaction "datestamp" in the answerspace "blinkhelp". In this case we are sending "123456789" to be converted to a date. The called interaction code is

// datestamp code
$t->result = date( "d/m/Y h:i:s A", $args[0]);
return $args[0] . "   <=>  " . $t->result;

The returned value is 123456789 <=> 30/11/1973 08:33:09 AM