wrong identifier

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
4xjbh
Posts: 177
Joined: Thu Dec 22, 2005 10:01 pm
Location: Brisbane

wrong identifier

Post by 4xjbh »

I am getting a "Possible wrong identifier Company ...... with this rule

If People.UseCompanyAddress='Yes' Then
People.Address=Company.Address
People.Suburb=Company.Suburb
People.Postcode=Company.Postcode
People.Country=Company.Country

Why
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

You are getting this message because object Company is not in the context for this rule (please refer to Aware IM User Guide for details on the context). If this rule is defined for the object People the initial context is the instance of People. Therefore, all identifiers used in the rule must start with People. You can extend the context by adding instances of other objects using actions like FIND or CREATE, for example: 'FIND Company WHERE ... '. Then you can use Company as part of your rule.

If you have attribute People.Company you should change your rule actions to look like this:

People.Address=People.Company.Address
...

If you do not have such an attribute, let me know where/how you expect to get the Company from and I can suggest a rule action to achieve that.

As a general note, since object rules work on a particular object instance, the rules may be easier to read if objects have singular names. For example, consider renaming object People to Person. This does not affect the object relationships in any way. For example, Company would still have attribute People of type Person with multiple instances allowed. This is unlike other database systems where tables often have plural names. In Aware IM, however, an object represents a business concept, so it may be more intuitive to refer to it (in rules and elsewhere) using a singular name.
Aware IM Support Team
Post Reply