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 » Tue Apr 16, 2019 5:25 pm

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 » Tue Apr 16, 2019 5:39 pm

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: 1007
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Differentiating between instances of LegalDescriptions

Post by BobRichards » Wed Apr 17, 2019 10:28 am

Great job!
Bob Richards, Software Developer, SoftPro

Post Reply