Visibility Based On UW not being a certain one

Questions about and code samples for adding visibility conditions within Select
Post Reply
lburkeckc
Posts: 6
Joined: Tue Apr 16, 2019 3:41 pm

Visibility Based On UW not being a certain one

Post by lburkeckc »

How can I set a visibility based upon the UW Lookup Code NOT being a particular code. For example I want a folder to show if the UW Lookup Code is NOT NA.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Visibility Based On UW not being a certain one

Post by BobRichards »

Here we make use of multiple (simple) tests to make sure there is an Underwriter in the order and it has a lookup code entered. You have to do these steps so an error will not occur if the order is not configured properly (for instance - if there is no underwriter).

Code: Select all

if Order.Underwriters.Count == 0:
	# No underwriters: hide folder
	return False

if Order.Underwriters[0].LookupCode is None:
	# First underwriter has no LookupCode: hide folder
	return False

# Hide folder if LookupCode is "NA"
return Order.Underwriters[0].LookupCode != "NA"
Bob Richards, Senior Software Developer, SoftPro
lburkeckc
Posts: 6
Joined: Tue Apr 16, 2019 3:41 pm

Re: Visibility Based On UW not being a certain one

Post by lburkeckc »

Thank you so much.
Post Reply