Salesforce-Marketing-Cloud-Engagement-Developer Practice Test

Salesforce Spring 25 Release
196 Questions

A developer has a text field in a data extension they want to format using the FormatCurrency AMPscript function. Which two values would return $6.96? (Choose 2)

A. 6,961

B. 6.96

C. $6.96

B.   6.96
C.   $6.96

Explanation:

✅ B.  6.96
This is a numeric value in proper decimal format, and FormatCurrency(6.96) will output $6.96 using AMPscript’s built-in formatting rules. The function adds the appropriate currency symbol and formats it to two decimal places. This is a standard and expected input for this function. It demonstrates AMPscript’s ability to handle numerical formatting in dynamic email content, ensuring professional display of prices or financial data.

✅ C. $6.96
While this may seem counterintuitive, AMPscript is forgiving in some cases and can recognize this as a string representing currency. It automatically parses the value and still outputs $6.96. This only works because the input format already matches the desired output and contains the symbol. However, developers should prefer passing numeric values to avoid unintended results with localized formats or currency symbols other than $.

❌ A. 6,961
This input has a comma, which could be misinterpreted depending on the AMPscript context or locale settings. AMPscript expects a number, and if commas are present, they may either cause the function to fail or produce unintended formatting results. For example, this might be treated as "6" or even throw an error. In most cases, currency formatting does not work well with pre-formatted input, especially when commas or thousands separators are involved.

Page 1 out of 196 Pages