Multiple Products in Drop Down and how to set in API

Discussions related to custom development with Select.
Post Reply
ddudley3
Posts: 55
Joined: Fri May 03, 2013 9:11 am

Multiple Products in Drop Down and how to set in API

Post by ddudley3 »

If I'm in the Softpro Select Client and have an order with more than 1 Loan Policy or Owner's Policy in the drop down for Policy under

Title Insurance Premiums
Prior Policy Adjustments

and I want to set the values under neath them within the API, How do I?

The First of each type gets set fine by me using the API and setting the structures

Order.Title.TitleInsuranceCalculations.OwnersPolicy.PriorPolicies.<fields>
Order.Title.TitleInsuranceCalculations.LoanPolicy.PriorPolicies.<fields>

But I don't know how to reference the other Loan Policy or Owner's Policy object in the drop down above.

thanks,
David
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Multiple Products in Drop Down and how to set in API

Post by BobRichards »

This is a good example of when to use the Field Code Browser to see the hierarchical structure of the Order model. If you navigate to TitleInsuranceCalculations (Order.Title.TitleInsuranceCalculations), you can see that this object is a collection of TitleInsuranceCollection objects. If you iterate over this collection, you will be able to access all of the loan and owners policies. For example:

Code: Select all

dynamic firstTIC = Order.Title.TitleInsuranceCalculations[0]
dynamic firstLP = firstTIC.LoanPolicy
dynamic firstOP = firstTIC.OwnersPolicy

dynamic secondTIC = Order.Title.TitleInsuranceCalculations[1]
...
The prior policies collection is a child of the policies that you can iterate over.

Code: Select all

dynamic priorPolicies = firstLP.PriorPolicies
I used dynamics in this example, but you can use IOrderItem objects if you wish.
Bob Richards, Senior Software Developer, SoftPro
Post Reply