Converting Plain Text to a BO Type

Contains tips for configurators working with Aware IM
Post Reply
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Converting Plain Text to a BO Type

Post by jclark58 »

I receive a email containing text fields that I want to store as an enumerated BO attribute.

eg I have a BO Locality that contains the values North, South, East and West and may conceivably have other vaules in future. How can I set the attribute based on incomming text of North S e and W?
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Not sure I understand the problem. Why can't you have choices for the attribute and then use rules to set the values?
Aware IM Support Team
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

This would mean hardcoding values for each condition based on string matching literal strings in saparate rules.

Is there a way I can take a literal string sent from an external system and "look up" the matching BO type?

ie this would mean one rule for n BO types as opposed to n rules and thus would allow greater system flexibility
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

The way to look up and assign a reference attribute based on a text attribute is to have a rule on the object (MyObject in this example) with two actions like these:

FIND OtherObject WHERE OtherObject.Name = MyObject.TextAttribute
MyObject.ReferenceAttribute = OtherObject
Aware IM Support Team
jclark58
Posts: 192
Joined: Thu Mar 02, 2006 2:36 am
Location: Tasmania, Australia

Post by jclark58 »

Very Good!

How would you do it for multiple reference items, where say the incomming string from a multiple select combo box was say 'one, three, five, eleven' and the referenced BO attribute allows multiple items to be selected?
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

The following variation will add all object instances found by the FIND action to a multiple-allowed reference attribute:

FIND OtherObject WHERE OtherObject.Name CONTAINS MyObject.TextAttribute
INSERT OtherObject IN MyObject.ReferenceAttribute
Aware IM Support Team
Post Reply