Jump to content

AllegraSptbg

Registered Users - Approved
  • Posts

    11
  • Joined

Posts posted by AllegraSptbg

  1. Sorry Step. I think I copied an old number. The only number that will truly need to be a "1" is the last digit. I am just trying to keep from having to touch the Excel spreadsheet at all and have FusionPro do all of the work. I cannot get the output I want in Excel by converting it "text" without also going through the extra step of formatting the cell to "custom" and changing the type to "01".

     

    Here is another example: 4.72E+16 needs to convert to 472001055674610001

  2. I have a number in a data column in excel displaying 4.72E+16, but I need it to read 47200000000001001. Currently I am achieving this in Excel by formatting the cells to a Number with 0 decimal places and entering 01 for the type in Custom. Is there a JavaScript in FusionPro to achieve this same result?
  3. This is an example of what I currently have:

     

    var Var1 = "CALCULATION";

    var Format = "Format1";

    var CurrencySymbol = "Symbol1";

    var amount = Field("CALCULATION");

    var result = "$0.00";

    if (amount != "0") result = "$" + FormatNumber("#,###.00", amount);

    return result;

    symbol = "";

    symbol2 = "";

    if (CurrencySymbol == "Symbol1")

    {

    symbol = "$";

    symbol2 = "USD";

    }

    if (CurrencySymbol == "Symbol2")

    {

    symbol = "?";

    symbol2 = "EUR";

    }

    if (CurrencySymbol == "Symbol3")

    {

    symbol = "£";

    symbol2 = "GBP";

    }

    if (CurrencySymbol == "Symbol4")

    {

    symbol = "¥";

    symbol2 = "YEN";

    }

     

    function SwitchDelimiter(x)

    {

    x = ReplaceSubstring(x, ".", "a");

    x = ReplaceSubstring(x, ",", ".");

    x = ReplaceSubstring(x, "a", ",");

    return x;

    }

     

    if (Format == "Format1")

    return symbol + FormatNumber("#,###.##", Field(Var1));

     

    if (Format == "Format2")

    return symbol + SwitchDelimiter(FormatNumber("#,###.##", Field(Var1)));

     

    if (Format == "Format3")

    return symbol + FormatNumber("####.##", Field(Var1));

     

    if (Format == "Format4")

    return symbol + SwitchDelimiter(FormatNumber("####.##", Field(Var1)));

     

    if (Format == "Format5")

    return symbol2 + "" + symbol + FormatNumber("#,###.##", Field(Var1));

     

    if (Format == "Format6")

    return symbol2 + "" + symbol + SwitchDelimiter(FormatNumber("#,###.##", Field(Var1)));

     

    if (Format == "Format7")

    return symbol2 + "" + symbol + FormatNumber("####.##", Field(Var1));

     

    if (Format == "Format8")

    return symbol2 + "" + symbol + SwitchDelimiter(FormatNumber("####.##", Field(Var1)));

     

    if (Format == "Format9")

    return symbol + FormatNumber("#,###.##", Field(Var1)) + "" + symbol2;

     

    if (Format == "Format10")

    return symbol + SwitchDelimiter(FormatNumber("#,###.##", Field(Var1))) + "" + symbol2;

     

    if (Format == "Format11")

    return symbol + FormatNumber("####.##", Field(Var1)) + "" + symbol2;

     

    if (Format == "Format12")

    return symbol + SwitchDelimiter(FormatNumber("####.##", Field(Var1))) + "" + symbol2;

  4. Newbie here. Thanks for any help.

     

    I currently have 10 fields within a database that I will need to convert to currency once imported. Is there anyway to modify the "Number to Currency" rule so that when the number = "0", "$0.00" is returned without affecting any of the numbers that do not = "0"?

×
×
  • Create New...