Questions about and code samples for adding visibility conditions within Select
- Posts: 19
- Joined: Wed Sep 26, 2018 1:24 pm
Can I please get the syntax for the following two situations?
If Seller Type = "Individual"
If Seller Type = "Organization"
- Posts: 1006
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
Under the covers, the BuyerSellerType is a bitwise enumeration that allows you to use a math trick to determine if the buyer or seller is of type Individual or Organization.
Code: Select all
# Determine if buyer is an organization...
bool isOrganization = (buyer.BuyerSellerType & BuyerSellerType.Organization) == BuyerSellerType.Organization
# Determine if seller is an individual...
bool isIndividual = (seller.BuyerSellerType & BuyerSellerType.Individual) == BuyerSellerType.Individual
Bob Richards, Software Developer, SoftPro