I am trying to use automation to update a Total Cost Field using the formula:
{{#=}}{{lookupAsset.attributes.cost}} * {{issue.Number of Units}}{{/}}
I am getting an error Unexpected comma at character position 1: 1,577.66 * 2.0.
This is because the Cost value associated with Asset has a comma (I verified by removing the comma from the cost which allows the formula to work).
So, in order to not have to update all my costs to remove the comma. Is there a way to modify the formula to ignore the comma?
You could try using the text functions remove() or replace() to get rid of the comma before it used: https://confluence.atlassian.com/automation/jira-smart-values-text-fields-993924863.html
For example, perhaps try this:
{{#=}}{{lookupAsset.attributes.cost.remove(",")}} * {{issue.Number of Units}}{{/}}
If that does not work, you may need to capture / save the asset value in a Created Variable first, and then perform the remove().
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.