Differentiating between instances of LegalDescriptions

Questions about and code samples for custom order rules and validation within Select.
Post Reply
kylecrosland
Posts: 12
Joined: Thu May 04, 2017 6:28 pm

Differentiating between instances of LegalDescriptions

Post by kylecrosland »

Hello,

I'm trying to place a custom order rule in the LegalDescription.LookupCode field. I want a rule that sets the value of the field to 'Comm Legal' when the field is associated with the EscrowLegal or the PolicyLegal, but not the CommitmentLegal. I want the LookupCode field of the CommitmentLegal to remain blank by default.

This is what I tried:

def LegalDescription_LookupCode_Value (args):
if str(args.Context) != 'CommitmentLegal':
args.Value = 'Comm Legal'

Any advice? Thanks!

Kyle
kylecrosland
Posts: 12
Joined: Thu May 04, 2017 6:28 pm

Re: Differentiating between instances of LegalDescriptions

Post by kylecrosland »

Figured it out.

def LegalDescription_LookupCode_Value (args):
if str(args.Context.Owner.EscrowLegal) == str(args.Context) or str(args.Context.Owner.PolicyLegal) == str(args.Context):
args.Value = "Comm Legal"
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Differentiating between instances of LegalDescriptions

Post by BobRichards »

Great job!
Bob Richards, Senior Software Developer, SoftPro
Post Reply