Page 1 of 1

Visibility Based On UW not being a certain one

Posted: Thu May 09, 2019 4:20 pm
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.

Re: Visibility Based On UW not being a certain one

Posted: Thu May 09, 2019 4:36 pm
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"

Re: Visibility Based On UW not being a certain one

Posted: Fri May 10, 2019 3:35 pm
by lburkeckc
Thank you so much.