I don't think you need a script for this.
Make a table with two fields and call it "CurrencyValues"
Put a matching field for CurrType in your main table and make this your drop down menu.
Make a relationship between your main table and CurrencyValues:
Define a conversion calculation and use it as either an auto-entered number or a calculated field
Maintable::UnconvertedCurrency * CurrencyValues::ConvFactor
I am sure it makes perfect sense, however, l am a newbie to the back end and am grappling with your explanation. I think l have established the relationship between the two tables but am unable to complete the final lap!!
Any chance of putting some meat onto your explanation, please?
In a layout that refers to your main table, place the MainTable::CurrType field on this layout and format it to use a drop down list. Set up the value list for this drop down list to list all the values from CurrencyValues::CurrType.
Place the MainTable::UnconvertedCurrency field on this layout also.
Define a calculation field "ConvertedCurrency" in the Main table as Maintable::UnconvertedCurrency * CurrencyValues::ConvFactor. Set it to return the number data type.
Place this field on the layout.
Enter Browse mode and enter a number in UnconvertedCurrency. Select a currency type from the drop down menu and you should see the converted value appear in MainTable::ConvertedCurrency.
Thank you very much-you got me there.
All the best