Tag Archives: SalesTable::find

strFmt

This is an easy way to use labels and infologs in a bit more dynamic manner. It also makes it easier to do type conversion of for example dates to strings when printing to infologs.

1
2
3
4
5
6
7
8
9
10
11
12
13
static void FO_StrFmt(Args _args)
{
    CustTable   cust    = CustTable::find("4000");
    SalesTable  sales   = SalesTable::find("00697_036");
    ;
 
    info(strFmt("Hello %1!", cust.Name));
 
    info(strFmt("Hello %1, you live in %2!", 
                cust.Name, cust.City));
 
    info(strFmt("%1", sales.DeliveryDate));
}

OutPut:

Hello Light and Design!
Hello Light and Design, you live in Los Angeles!
2008-03-04

Notice that the date is presented in the format that is set up on the clients computer. In this case the Swedish format. The same format that you see in the Sales Table form.