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
wrong identifier
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
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.
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