The 1st problem I had was despite adding the negative sign in the format mask in UDF Maint and then adding to LB_QUANTITIES listbox with Customizer, a negative UDF value appears as positive on the Quantity tab. So I'm not sure if you ran into this as well. Check on that.
Sage programming conditionally shows negative qtys for standard fields in red via a special variable cListViewNegativeColor$ in IM_ItemQuantityInquiry_ui.pvc. So the best way to deal with that is a program override that would include your UDF with that formatting.
Another way is to carefully DFDM edit IM_ITEM.M4L on the appropriate mas90\IM\Custom\ folder (after making a backup of it) then finding the PQUANTITY record for it that corresponds to LB_QUANTITIES. Since you and I have been involved with doing this type of thing before, you're interested in changing Field 23 Nomads_Null$ and Field 36 Nomads_Scratch$.
Let's say actual name is UDF_QTY_AVAIL and shows as "Qty Avail".
This is how you normally would see your portion of the long string:
Qty Avail~STP(STR(UDF_QTY_AVAIL:"#¬###¬###.00")¬2)
You would insert the special variable into it like this:
Qty Avail~cListViewNegativeColor$+STP(STR(UDF_QTY_AVAIL:"#¬###¬###.00")¬2)
Now a negative UDF value shows in red but for me didn't make the negative sign appear.
I had to do it this way in case you need it:
Qty Avail~cListViewNegativeColor$+STR(UDF_QTY_AVAIL:"#,###,###.00-")
Lastly, if you use Customizer again on Item Maintenance there's a fair chance it will reset this PQUANTITY LB_QUANTITIES record with the defaults for Fields 23 and 36. You will have to test that. One way to handle that is a Panel PostLoad script on DMain that would call Perform Logic to check the record is set the way we want. If it's not, the Perform would fix the record so things will look right by the time you click Quantity.
------------------------------
Alnoor Cassim
Accounting Systems, Inc. (ASI)
------------------------------