Title: Multislot with single value

Hello,

I'm having a slight problem. I have this template:

(deftemplate grouped-facts
"facts that have been grouped"
(slot partitionname)
(slot partitionvalue)
(slot summationvalue)
(multislot factcollection))

Where factcollection is a collection of facts.

I have a rule:

(reset)
(defrule bondMVMaxPCOutstanding::calcifnc
(declare (auto-focus TRUE))
(rulesfired (rules bondMVMaxPCOutstanding))
 ?b <- (grouped-facts (partitionname cusip)
                                                (summationvalue ?mv)
                                                (partitionvalue ?c)
                                                (factcollection ?fc))

// Code here

 (test (>  ?c 0)))
  =>
…………………………etc


I need to check any of the facts have a particular slot value in the factcollection. Note that the factcollection may only have one fact.

I found a problem as I cannot seem to do this, but I can directly ask ?fc for a value that one of its facts contains:

E.g

(Call ?fc getSlotValue productType) but this seems to work. This is fine when there is only one fact in the multislot but not so good when there is more than one.


Thanks

Chirag


NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.

Reply via email to