All in ALL AutoFormat in multiple items.

Is it possible for the automatic formatting currency on direct in the form elements.

Tried to use the point Format mask, it won't fly. Found this article and unable to implement in 4.2.

http://jeffkemponoracle.com/2014/08/25/AutoFormat-any-amount-item-anywhere/

Can someone help me please.

Hi Nani4850,

Nani4850 wrote:

I am a newbie in java script. Here are the details of my work space.

W/U/P-nani4850/kiran/kiran

App 81422

Please check your Application-> Page 1 81422. I put two examples on the page.

Here's how the examples are created:

  • Using jQuery to Jeff Kemp method:

    • JS file of "formatMoney.js" created using the code of the Jeff Kemp (mentioned below) and downloaded on demand->-> static files of the Application, the shared components:
Number.prototype.formatMoney = function(decPlaces, thouSep, decSep) {
  var n        = this
    ,decPlaces = isNaN(decPlaces = Math.abs(decPlaces)) ? 2 : decPlaces
    ,decSep    = decSep == undefined ? "." : decSep
    ,thouSep  = thouSep == undefined ? "," : thouSep
    ,sign      = n < 0 ? "-" : ""
    ,i        = parseInt(n = Math.abs(+n || 0).toFixed(decPlaces)) + ""
    ,j        = (j = i.length) > 3 ? j % 3 : 0;
  return sign
    + (j ? i.substr(0, j) + thouSep : "")
    + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + thouSep)
    + (decPlaces ? decSep + Math.abs(n - i).toFixed(decPlaces).slice(2) : "");
};
  • Edition Page 1: Added the file reference to 'formatMoney.js' Page attributes-> JavaScript-> file URL section
#APP_IMAGES#formatMoney.js
  • Created region Standard 'JQuery to use Jeff Kemp method' with a 'field' named 'P1_CURRENCY_01' with the following attributes:

In the Section "Identification":

Display as: numeric field

In the section "settings":

Format mask: 999G999G999G999G990D00

Number alignment: right

In the section "Element":

Classes CSS HTML Form element: edit_money

Text of the pre element: $

  • Created the dynamic Action named 'format_currency_jeff_kemp' with the following attributes:

Event: change

Selection type: jQuery Selector

jQuery Selector: .edit_money (as it is a class selector there is dot before class "edit_money")

Condition: is not null

Action: Run the JavaScript Code

Fire on loading the Page: No.

Code:

var i = "#"+this.triggeringElement.id;
var v = parseFloat($(i).val().replace(/,/g,''))||0;
$(i).val( v.formatMoney() );

Items concerned: do not choose anything.

  • Using the method of library javascript-number-trainer JS:

    • Downloaded 'format. 20110630 - 1100.min.js' library javascript-number-trainer and downloaded on demand->-> static files of the Application, the shared components.
    • Edited Page 1: Added reference to article "format. 20110630 - 1100.min.js" file Page-> JavaScript-> the URL of file attributes
#APP_IMAGES#format.20110630-1100.min.js
  • Created a region Standard ' Using javascript-number-trainer JS Library method ' with a 'field' named 'P1_CURRENCY_02' with the following attributes:

In the Section "Identification":

Display as: numeric field

In the section "settings":

Format mask: 999G999G999G999G990D00

Number alignment: right

In the section "Element":

Classes CSS to HTML form elements: currency

Text of the pre element: $

  • Created the dynamic Action named 'format_currency_jeff_kemp' with the following attributes:

Event: change

Selection type: jQuery Selector

jQuery Selector: .currency (since this is a class selector there is dot before class "currency")

Condition: is not null

Action: Run the JavaScript Code

Fire on loading the Page: No.

Code:

this.triggeringElement.value = format( "#,##0.00", this.triggeringElement.value );

Items concerned: do not choose anything.

NOTE:

  • To add this feature to other elements 'Number field', you add just the attributes of the element mentioned above and the most important, the class mentioned in "Classes CSS to HTML Form element". Do not create a dynamic action for each item. You must create the dynamic action once in the page.
  • Also, remember to add the library reference appropriate JS, you will use in the attributes of Page-> JavaScript-> file URL in the pages you want to add this feature.

Kind regards

Kiran

Tags: Database

Similar Questions

  • ListBox drag multiple items

    You want to drag multiple items in a listbox.  Is this possible?

    Jared,

    Thanks for the reply.

    I should mention that all of these parameters, you pointed out have been defined before that I posted here.

    Just as you mentioned that this does not work if the target is a tree control.

    It is not my design.  I just put on a finishing touch.  This tree control is complicated roles.  I certainly don't want to manage the drop event.

    I found a work around:

    The end of listbox drag event, find the position of falling, in programmetically add several items.

  • Captivate 9 timeline weird behavior - multiple items on the same line

    I'm a 7 Captivate program migrate 9 Captivate.

    I opened 9 Captivate

    I opened the version 7 of Captivate

    Everything worked perfectly.

    All of a sudden the timeline behaves badly.

    Now when I try to change the stacking order, several objects are appearing on the same line. Some lines are empty.

    Has anyone seen this? I've included a screenshot.

    Articles 1, 2, 3 multiple items on the same line

    Point 4, lines are empty.

    Can someone provide advice?

    Thanks Lieve. I tried everything, except the reset of the workspace (don't think this!). The project was corrupt finally decided (he was not past in other projects).

    I ended up creating a new project and copied into the new project slides. It worked fine after that.

    GRR... an hour lost

  • Select multiple items in the tree programmatically

    What is the approach recommended for selection by program several elements in a tree? There is an API on the model of selecting either TreeView.getSelectionModel () .select (t, object) to select a single item, but it is not an equivalent API to select multiple items, i.e. TreeView.getSelectionModel (.select(T...objects)).

    One approach is to expand the tree and iterate through all nodes and calculate the index of each item to be selected and then call the method TreeView.getSelectionModel ().selectIndices(int...indices).
    In my case, I want only the records that contain the selected items to be developed for an additional step is to browse all folders and the collapse of those that do not contain the selected items.

    Is there an easier approach?

    Thank you.
    Stefan

    Don't do what suggests Zonski! :-)
    These lists are read-only - you will quickly get a runtime exception.

    The best approach is to just a multiple selection to be on and then loop through the desired selection list, by selecting each element individually. Because multiple selection is enabled, select calling repeatedly will not erase the previous selection.

    -Jonathan

  • Show and hide multiple items using wildcards in advanced Actions?

    Is there a way to show or hide multiple items at once by using a wildcard character in advanced Actions?  Ex: Hide all the boxes to click in the presentation that begin with click_ *.

    I'm trying to find a good way to use the same CBT to show me Mode (demo video with audio and no interaction) and the practice Mode (interactive simulation with boxes to click and prompt text box for interactions).

    I saw a few business solutions have the ability to have 1 source file that publishes on multiple formats (demo, simulation, quick guide).  However, they are a little more than 800 $de Captivate.

    Micky

    If I want to create a combination, I capture in all modes search and then copy and paste what I want one of the files? An example, but it's on a Dutch version of my blog, watch movie (power of lightning, hope, that you will always be able to see SWF?):

    http://captivatenederlands.posthaven.com/classic-tutorials

    Lilybiri

    PS as for your original question: no wildcard in advanced actions. You can filter drop-down lists on "click_" and only objects will appear then (in CP6/7) but you will still need a single statement by click box unless you group boxes click on a slide (impossible to group objects sitting on different slides).

  • Select multiple items using a selection list?

    Hi all

    In my application, I have a HTML area with two elements of the selection list. According to the first value of the selection list, the second selection list will fill up.

    Now I want to show a report based on the second select value list, but I want to select several values in the second selection list. For this, I just activated the multiple selection option in the selection list item.

    But when I tried to implement this, the error occurs.

    Select multiple items using a selection list? If this is the case, how can I assign these values in the selection list element onchange attribute.

    Thank you
    David...

    A further possible solution to that above with the function of pipeline is to simply use Instr.

    Note: This option should be used if the amount of data is small or already filtered by other predicates.

    SELECT display_value, return_value
      from xxx
     where INSTR(':'||:P1_MASTER_MULTI_SELECTLIST||':', ':'||parent_value||':') > 0
     order by display_value
    

    BTW, if you use the new attribute "Cascading LOV Parent éléments" in the LOV section and set it to your parent element (in my example P1_MASTER_MULTI_SELECTLIST), the agenda of the child page is automatically updated if the master multi selection list is changed.

    Concerning
    Patrick

  • How to select and move more than one bookmark at a time? Shift + click selects multiple items that are next to each other in a list, because the element

    How to select and move more than one bookmark at a time?
    Shift + click selects multiple items that are next to each other in a list, because the items open in firefox before that happens.

    Glad it worked for you. Thanks for posting back.

  • BlackBerry smartphones to select multiple items

    How to select multiple items on the storm?

    OK figured it. Only works on the E-mail list. Why would anyone want to select more than one email?

  • Impossible to select multiple items in the list box

    I use Acrobat 9.0 Standard.

    I added a list box in the PDF format and I want to give people the ability to select multiple items in the drop-down list. In properties, on the Options tab, I chose 'multiple choice '. But I am unable to make multiple selections despite this. It still only allows me to make a choice.

    Any ideas? Is there some other step I'm missing?

    I need help with this ASAP for my business - any suggestions are appreciated!

    Thank you

    It should do that if you hold down the SHIFT key.

  • Is it possible to import multiple items?

    Is it possible to import multiple items?

    Not through the current user interface, but it's something that we'll think actively. It is possible to build a tool to do this, use our API development, but it's something that we certainly are given including the base product. Our test team would like to have too

    Neil

  • Select multiple items in a menu list

    I recently picked up a site for someone who asked me to create a list of items for the user to select "How did you find our Web site" I have read the Help menu on DW8 and created a list/menu, etc. But when I check multiple items in the list, it is still only one item in the form that is sent to me. What I am doing wrong?

    www.blessedunions.com/contact.html


    Thank you!

    Here's what fixed it: I changed to individual boxes and change the 'value' of each radio button to "Yes".

  • HP Officejet 5740 e-All-In-One: multiple frustrations with printer e-all-in-one-hp officejet 5740.

    I have a HP Officejet 5740-e all-in-one that has all sorts of problems: periodically decides not to print documents from one of my laptops HP or Lenovo.  Do not accept ink cartridges HP Instant ink or HP ink cartridges purchased in a store.  Unable to get decent support for this HP product.  Is essentially a disposable item now?

    As far as I know that there is no user replaceable parts in these lower end home use printers. So if nine ink cartridges do not work, and seeing that the cost of the printer is less than $ 100, Yes... it's basically a Jet printer away. Wish I had better news for you.

  • Delete all styles (to multiple assets.)

    Is there a way to "clean all" multiple assets at once? As far as I can tell the only way to proceed is individually. The active Panel does not have this option.

    Any help or suggestion would be greatly appreciated.

    Thank you

    Ryan.

    You can select all the content on the page and then right-click > erase all styles.

    Thank you

    Sanjit

  • Exactly, what is 'All' when handling webapp items in a collection?

    With regard to this documentation - http://docs.businesscatalyst.com/dev-assets/reference#!/how-tos/liquid/listing-and-filtering.html and also when from the collections, not all all average or does only list 500 items at once? Also, what is the speed of performance difference when say a loop in a collection vs. using categories to display specific items. I got some webapps which contained about 70 000 points before, so I was curious.

    All - all the elements.

    With modules, you know how you have the filters - Classification - c, one is all, cl - last on the list, l - last elements.

    This is what it means.

    In terms of number of items that you use.resultsPerPage="" This is the limit of number of items before pagination.

    BC will always be a limit (varies depending on the load but its about 500 articles).

    So if you are running a collection to iterate over each set of pages, it will not only all of the 70 k.

  • How to set global variables for use by all THE #subform [0] items of form1. ?

    Hi all

    I don't know how to code javascript but am new to Adobe LiveCycle.  When I open the script editor, I have the following code (the code is in United Nations in bold):

    -form1. #subform [0]: initialize :-(FormCalc, client).

    //////////////////////////////
    TO START: SET GLOBAL PRICES.
    //////////////////////////////

    var Cityscope_Sydney_CostUser1 = 60,39;
    var Cityscope_Sydney_CostUsers2to5 = 3.02;
    var Cityscope_Sydney_CostUsers6to20 = 1.21;
    var Cityscope_Sydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_Sydney_CostHardCopyWithoutOnline = 54,67;
    var Cityscope_Sydney_CostHardCopyAdditional = 14.59;

    var Cityscope_NorthSydney_CostUser1 = 48,40;
    var Cityscope_NorthSydney_CostUsers2to5 = 2.42;
    var Cityscope_NorthSydney_CostUsers6to20 = 0.97;
    var Cityscope_NorthSydney_CostHardCopyWithOnline = 14.59;
    var Cityscope_NorthSydney_CostHardCopyWithoutOnline = 43,54;
    var Cityscope_NorthSydney_CostHardCopyAdditional = 14.59;


    ////////////////////////////
    END: SET GLOBAL PRICES.
    ////////////////////////////

    -form1. #subform [0]: enter :-(FormCalc, client).

    -form1. #subform [0]: output :-(FormCalc, client).

    -form1. #subform [0]: calculate :-(FormCalc, client).

    -form1. #subform [0]: validate :-(FormCalc, client).

    -form1. #subform [0]: preSave - (FormCalc, client).

    < < = etc etc etc = > >

    -form1. #subform [0]. Item1Cost::initialize :-(JavaScript, client).

    -form1. #subform [0]. Item1Cost::enter :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::exit :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::calculate :-(JavaScript, client).

    Store the values of the form of friendly names.
    var AreaSelected = Item1Area.rawValue;
    var NumberOfUsersSelected = Item1Users.rawValue;

    Declare other variables.
    var Users1Calculation;
    var Users2to5Calculation;
    var Users6to20Calculation;


    Calculate the cost to the "components" user will depend on the number of users selected for the region.
    Switch (true)
    {
    If (NumberOfUsersSelected < 2):
    Users1Calculation = NumberOfUsersSelected * Cityscope_Sydney_CostUser1;
    Users2to5Calculation = 0.00;
    Users6to20Calculation = 0.00;
    break;
    If (NumberOfUsersSelected > 1 & & NumberOfUsersSelected < 6):
    Users1Calculation = Cityscope_Sydney_CostUser1;
    Users2to5Calculation = (NumberOfUsersSelected - 1) * Cityscope_Sydney_CostUsers2to5;
    Users6to20Calculation = 0.00;
    break;
    If (NumberOfUsersSelected > 5):
    Users1Calculation = Cityscope_Sydney_CostUser1;
    Users2to5Calculation = 4 * Cityscope_Sydney_CostUsers2to5;
    Users6to20Calculation = (NumberOfUsersSelected - 5) * Cityscope_Sydney_CostUsers6to20;
    break;
    by default:
    Alert ("BROKEN: calculate the individual components of cost of use will depend on the number of users selected for the region.");

    }

    apply the total cost for this article
    Item1Cost.RawValue = Users1Calculation + Users2to5Calculation + Users6to20Calculation;

    -form1. #subform [0]. Item1Cost::validate :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseEnter :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::mouseExit :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::change :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::full :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseUp :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::MouseDown :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::click :-(FormCalc, client).

    -form1. #subform [0]. Item1Cost::preSave - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::postSave - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::prePrint - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::postPrint - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::preSubmit:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Cost::docReady - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::docClose - (FormCalc, client).

    -form1. #subform [0]. Item1Cost::ready:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Cost::ready:layout - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::initialize :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::enter :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::exit :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::calculate :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::validate :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseEnter :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::mouseExit :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::change :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::full :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseUp :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::MouseDown :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::click :-(FormCalc, client).

    -form1. #subform [0]. Item1Users::preSave - (FormCalc, client).

    -form1. #subform [0]. Item1Users::postSave - (FormCalc, client).

    -form1. #subform [0]. Item1Users::prePrint - (FormCalc, client).

    -form1. #subform [0]. Item1Users::postPrint - (FormCalc, client).

    -form1. #subform [0]. Item1Users::preSubmit:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::docReady - (FormCalc, client).

    -form1. #subform [0]. Item1Users::docClose - (FormCalc, client).

    -form1. #subform [0]. Item1Users::ready:form - (FormCalc, client)-

    -form1. #subform [0]. Item1Users::ready:layout - (FormCalc, client)-

    .. and so on and so forth...

    In short, I want the code in:

    -form1. #subform [0]. Item1Cost::calculate :-(JavaScript, client).

    .. .to be able to access the variables I created in:

    -form1. #subform [0]: initialize :-(FormCalc, client).


    (I guess that's where I store global variables)

    At this point, global variables are not accessible with the above configuration.  Was the only one I can get this working is to cut and paste the Globals in each item of form1. #subform [0], which of course defeats the purpose of global variables!  I intend to have a lot more items so wouldn't duplicate global variables for each of them!

    Can someone show me how to do this?

    Any help is very appreciated!

    Thank you

    Stanbridge

    Post edited by: stanbridgej - colors and fonts or not will not save.  Are bolded my question make (non-fat) code easier to read (I hope).

    I haven't used Formccalc, but I thought it would be the same regardless. Insert a script object to the top of the hierarchy and call it, for example "sco." Paste the Globals. Then refer to variables of the extent that sco. Cityscope_Sydney_CostUser1, etc. Make one

    App.Alert (sco. Cityscope_Sydney_CostUser1);

    one of the fields. If the debugger is activated, it will tell you if it cannot resolve the reference as "sco. In this case, you may need to use the som expression to reference the script object, for example

    var scoScript = xfa.resolveNode ("topOfHierarchy.sco");

    scoScript.Cityscope_Sydney_CostUser1

    But if as close as possible to the top of the hierarchy above should work.

Maybe you are looking for