Post Author: cmainard
CA Forum: Formula
for you geniuses...
I want to eliminate the "leading zeroes" from a field.
I wrote this formula:
if {MoxyBroker.BrokerAlias1} startswith "0" then Right ({MoxyBroker.BrokerAlias1},4 ) elseif {MoxyBroker.BrokerAlias1} startswith "00" then Right ({MoxyBroker.BrokerAlias1},3 ) elseif {MoxyBroker.BrokerAlias1} startswith "000" then Right ({MoxyBroker.BrokerAlias1},2 ) else{MoxyBroker.BrokerAlias1}
It seems to work for the first scenario where the text field is 05076 it returns 5076 but it does the same thing if the text field is 00019 when I'm hoping to get 19, it returns 0019
what am i missing?
thanks again!