• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Document Generation API issue with evaluating a complex formula

New Here ,
Oct 21, 2023 Oct 21, 2023

Copy link to clipboard

Copied

I am trying to add up the Price of the Items and I can do it with the formula in the JSONata 'try' editor. But when I pass the same in the MS Word doc, it display the formula as it is instead of the expected value.

 

JSON:

{
"PurchaseDetails" : {
"Name" : "ATL062",
"Down_Payment__c" : "900",
"Items" : [ {
"Price" : "900"
}, {
"Price" : "6,565"
} ]
}
}
 
JSONata
$sum((
$orderCosts := $map(PurchaseDetails.Items, function($order) {
$parseInteger($order.Price, '#,##0')
});
$orderCosts
))
TOPICS
Document Generation API

Views

341

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 24, 2023 Oct 24, 2023

Copy link to clipboard

Copied

LATEST

Yep, we just don't support this syntax, sorry. Of course, remember you can do this in your code _before_ you call the API. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources