AnsweredAssumed Answered

Arcade expressionInfos

Question asked by gregb_mcpao on Sep 13, 2019
Latest reply on Sep 13, 2019 by kenbuja

I am using a popup to display a sales price and other fields. I want to format the sales price using an arcade expression in an expressionInfos section. I want this format: Text(Number($feature.SALE_PRICE, 0), '$###,###.##') but it's not working.

 

 

content = 

   "<div><span class='pao-black'>sale price:</span><span class='pao-blue'> {expression/sale-price}</span></div>"


var popupTemplate = {
      title: "<div>aaa</div>",
      content: content,
      actions: [goToxxx],
      expressionInfos: [{
      name: "sale-price",

         expression: $feature.SALE_PRICE // outputs value

       // expression: "Number($feature.SALE_PRICE, 0)" // strangly, this does not work

       // expression: "Number($feature.SALE_PRICE * 1, 0)" // but this does not work
       // expression: "Text($feature.SALE_PRICE, '$###,###.##')" // outputs value but does not format

       // expression: "Text(Number($feature.SALE_PRICE, 0), '$###,###.##')" // does not format
   }]
};

Outcomes