I need a bit of help please. I have some trouble formatting a price that is coming from Teachable. I am adding into an excel file different information and the price is coming like this: “4,26 Lei/lună”. What I want is a price formatted like this: “4.26” . Instead of comma, a dot and no other characters like Lei/lună. I also tried the AI tool for formatting but without success.
Any ideas on how I can achieve this, please?
Best answer by SamB
Hi @stefanasafti! 👋
Hope you don’t mind me hopping in to lend a hand with this. To replace the comma with a dot instead you could add amount = amount.replace(",", "."); in between the existing lines of code in your Code by Zapier action. The updated code should then look like this:
Then in the Create Spreadsheet Row action, you’d select the value that is output by the Code by Zapier action, instead of taking the value from the Teachable trigger. For example:
Can you give that a try and let us know if that gets it working as hoped?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.
I added the Code by Zapier before the data is being sent to Google Sheets
I added the price entry from Teachable
The test seems to run fine, BUT…the question is, how to I test everything so I see the final input? If i test the last step which is Google Sheets, the price output is formatted the same (4,26 Lei/lună).
Hope you don’t mind me hopping in to lend a hand with this. To replace the comma with a dot instead you could add amount = amount.replace(",", "."); in between the existing lines of code in your Code by Zapier action. The updated code should then look like this:
Then in the Create Spreadsheet Row action, you’d select the value that is output by the Code by Zapier action, instead of taking the value from the Teachable trigger. For example:
Can you give that a try and let us know if that gets it working as hoped?