Generating a flag

I cannot remember how to generate a (Special Order Item) flag based on a PAM table and I can’t fing anything in the KB or here. Can someone point me to a resource please?

Based on the following line in your product page template, if PAM_WebSalePrice is greater than zero a “WebSpecial” flag is displayed:

{if (product['product_weblinxcustomnumber2'] gt 0)} <div class="flag-webspecial">Web Special</div>{endif}</div>