Oct 24, 2013

How to get the address in single line


//BP Deviation documented
display Addressing CompanyAddress()
{
    str     singleLineAddr;
    ;

    for (j=0; j<10 j="j" p="p">    {
        if (j == 0 && strLine(CompanyInfo::find().Address, j))
        {
            singleLineAddr  +=  strLine(CompanyInfo::find().Address, j);
        }
        else if (strLine(CompanyInfo::find().Address, j))
        {
            singleLineAddr  +=  ', ' + strLine(CompanyInfo::find().Address, j);
        }
        else
        {
            break;
        }
    }

    return singleLineAddr;

}

No comments: