Fork me on GitHub
#clara
<
2020-01-06
>
contact90419:01:29

I am applying a basic rule saying

(defrule missing-information
[?event <- Event (nil? flower-id) (= ?id _id)]
=>
(insert! ->AddError _id  :error "Missing Flower _id"))

contact90419:01:10

for some reason, I have a Record with flower-id and it clara still telling me the flower-id is missing

mikerod20:01:24

@contact904 do you have more than one Event? Are you saying an Event with a non-nil flower-id and a unique _id is being matched with the above rule which insets the AddError fact? Your ->AddError syntax seems incorrect since it isn’t calling the fn to but guessing that this is maybe pseudo-code

contact90420:01:35

AddError is a new Record with fields _id, error, value it is close to a pseudo-code

contact90420:01:04

I am confused because I have been usings this rule for a long time, this is the first time I get this error

contact90420:01:56

I see what is my problem. I have similar _id;s

mikerod20:01:59

@contact904 (insert! ->AddError _id :error "Missing Flower _id") is missing parens was my comment on syntax (insert! (->AddError _id :error "Missing Flower _id"))