I would to like to analyze all the multiple sentences before choosing which to respond to based on words in the sentences. Specifically, I would like to order the keywords i find in a factset and then adjust the respond or reuse statements based on that in the control script. I tried the following script at the start of control but as I suspected it returns an empty response. I assume this is because nextinput does not just return a string but processes the input. How do I join each sentence in the input block to be searched with findtext?
$$sentence = ‘_0
$$currenttopic = %topic # get the current topic at start of volley
$$responsecount = %response
# Sentence is $$sentence
if (%more) { $$ni = next(input)
join($block $$ni)}
else { print($block)
if(findtext($block "home" 0)) {found home}
if(findtext($block “name” 0)) {found name}
}