Sample Scenario 9: Translating Captions in a Purchase Request

This scenario uses strings in captions so the text can be read by users in different countries.

To set up metadata, these strings must exist in the Forms database Strings tables:

Strings.Name Strings.String SpainString.String
sItem Item Prod
sWhse Whse Alm
sPoitemApprovalQuestion Do you approve of purchasing %1 %2 of [%3:%4] for delivery to [%5:%6]

Usted aprueba de comprar %1 %2 del %3 "%4" para la entrega al %5 "%6"

sPoitemApproval Purchase Approval

Aprobación de Comprar el Artículo

sOrderApproval Order Approval Aprobación del Documento

To set up the event message category, on the Event Message Categories form, specify this information:

Category
Specify FORMAT(sOrder Approval).
Description
Specify Approval of an Order.

To set up the event action parameters, create an event action that includes these parameters:

... 
QUESTION (
  CLIENTSUBSTITUTE( 
    "sPoitemApprovalQuestion", 
    P(QtyOrdered),
    P(UMDesc), 
    "STRINGS(sItem)",
    P(Item), "STRINGS(sWhse)",
    P(Whse)
  )
)
SUBJECT( 
  CLIENTSUBSTITUTE(
    P(PoitemApproval)
  )
)

CATEGORY("FORMAT(sOrder Approval)")
...

After the event action execution, the full components of the message in the database are:

  • EventMessage.Question
  • FORMAT(sPoItemApprovalQuestion, ~LIT~(100.0), ~LIT~(Metric Tons), STRINGS(sItem), ~LIT~(5" screw/x03 chrome\x04hex head\x05), STRINGS(sWhse), ~LIT~(MAIN))
  • EventMessage.Subject
  • FORMAT(sPoItemApproval)
  • EventMessage.Category
  • FORMAT(sOrderApproval)
An English-speaking user who refreshes the Inbox sees this message:
Component Text
Question Do you approve of purchasing 100.0 Metric Tons of [Item: 5" screw, chrome (hex head)] for delivery to [Whse: MAIN]
Subject Purchase Approval
Category Order Approval

A Spanish-speaking user who refreshes the Inbox sees this message:

Component Text
Question Usted aprueba de comprar 100.0 Metric Tons del Prod "5" screw, chrome (hex head)" para la entrega al Alm "MAIN"
Subject Aprobación de Comprar el Artículo
Category Aprobación del Documento