Using Multi-Script Extensions for Conditional Formatting
An example of multi-script usage is a mailing
address in which the multiscript values ensure that mailing labels
are formatted for local handling and delivery.
To add more value to mailing labels, the GO Sales and Retailers model applies conditional formatting to generate international address formats.
In the following example, Address line 3 is the name of a user-defined calculation that is used to generate line three of a mailing label. The expression uses a Country or region code value to specify how to format the line.
if ([Retailers].[Retailer site].[Country or region code] = 6) then (' ' + [Retailers].[Retailer site].[Address 1 (multiscript)]) else if ([Retailers].[Retailer site].[Country or region code] = 8) then ([Retailers].[Retailer site].[Address 2 (multiscript)]) else if ([Retailers].[Retailer site].[Country or region code] = 13) then ([Retailers].[Retailer site].[Region (multiscript)] + ' ' + [Retailers].[Retailer site].[City (multiscript)] + ' ' + [Retailers].[Retailer site].[Address 1 (multiscript)] + ' ' + [Retailers].[Retailer site].[Address 2 (multiscript)]) else if ([Retailers].[Retailer site].[Country or region code] = 14) then ([Retailers].[Retailer site].[Address 2 (multiscript)]) else ([Retailers].[Retailer site].[Address 1 (multiscript)])
Multiscript extensions allow a user in any language to use the same model columns to create an address block and see the address properly formatted for each delivery location. For more information, see the Mailing address data source query subjects in the gosales_goretailers sample model.