(modify ?ne (id (nth$ ?cnt1 $?names)))
I have been attempting to generate 'specific facts from generic facts. The basic use case is that I want to have a generic framework from which I call business-logic specific rules. In general, the framework will have no idea as to what types of facts need to be generated. Where I'm running into problems is in the 'modify' code. I believe that using run-time resolved slot name is causing me problems, but I could be wrong. The specific code that I have at present is:(defrule PopulateNnElementFromGenElement?ge <- (genElement (id ?id) (names $?names) (values $?values) (multinames $?multinames) (multivalues $?multivalues) )?ne <- (nnElement (id ?id))=>; for loop through the names(loop-for-count (?cnt1 1 (length$ $?names)) do(printout t "(nth$ ?cnt1 $?names) = " (nth$ ?cnt1 $?names) crlf)(printout t "(nth$ ?cnt1 $?values) = " (nth$ ?cnt1 $?values) crlf);(modify ?ne ( (nth$ ?cnt1 $?names) (nth$ ?cnt1 $?values) ) ))(printout t "PopulateNnElementFromGenElement!" crlf); TODO: do the same thing for multinames/multivalues;(deftemplate genElement;(multislot names);(multislot values);(multislot multinames);(multislot multivalues)))When I uncomment the modify statement I get the following error.[PRNTUTIL2] Syntax Error: Check appropriate syntax for duplicate/modify function.ERROR:(defrule MAIN::PopulateNnElementFromGenElement?ge <- (genElement (id ?id) (names $?names) (values $?values) (multinames $?multinames) (multivalues $?multivalues))?ne <- (nnElement (id ?id))=>(loop-for-count (?cnt1 1 (length$ $?names)) do(printout t "(nth$ ?cnt1 $?names) = " (nth$ ?cnt1 $?names) crlf)(printout t "(nth$ ?cnt1 $?values) = " (nth$ ?cnt1 $?values) crlf)(modify ?ne ((otherwise I get the expected output.(nth$ ?cnt1 $?names) = type(nth$ ?cnt1 $?values) = node(nth$ ?cnt1 $?names) = weight(nth$ ?cnt1 $?values) = 50PopulateNnElementFromGenElement!Any way around this? (I hope it isn't that I'm doing something stupid...) Thanks.