Toggling between currencies on a layout - How to format currency with calculation?
I am a little new to FM. I searched this forum but couldn't get the answer.
I have a layout that contains pricing of different items in US dollars (default currency). The number format for each field is setup to show 1000 as $1,000.00. However this database is for an export business, and the Euro is a common currency we deal with. So I need to be able to see the price in a different currency on the same layout.
What I'd like to do is add a global field to the table that relates to this layout, in which a user can input the conversion rate of the day, say, 0.712 (that's today's USD to EUR) from the layout. Once a value is input, a script trigger (OnObjectSave) will run a calculation on the fields that contain numbers and will convert them from dollar to euro.
I can take care of all the above (creating the global field, adding a field to the layout, writing the script and assigning it to the right trigger type), but am a little challenged on how to let the script substitute the number format say from $ to EUR (So $1,000.00 will become EUR712.00 and not $712). How can one change the currency format through calculation while maintaining these numbers as numbers and not text?