KINTONE PLUGIN CREATE MASK CURRENCY FOR FIELD

Hi,

I am a kintone developer.

i create a plugin create a mask for decimal field.

i create a text field and append it to form when create and hide kintone 's text field.

when i input to plugin 's text field and out focus, plugin 's input value be add to kintone field and opposite.

But i have a problem with a js file customize. In field change event i set value for a field and return event, but it not work.

who have this problem please help me.

thanks,

Hi chinh huynh!

Could you share your code file with us so we’ll be able to help you better?

 

can you help me view source in my app ? 

*comment deleted by Kintone Developer Program Admins*

Sorry Chính Huỳnh, I had to delete the contents of your post above, as you were making your domain name, user name and password public, which causes major security issues.

Please could you either copy and paste the js file into this post or post your code on GitHub and share us the link to the repository.

Please do not share credentials to your Kintone environment in this community.

 

Thanks!

please help me

https://github.com/chinhkimhuynh/kintone

Hi Chinh Huynh!

I’m not quite understanding what you are trying to do here.

Lemme clarify.

  1. You are trying to create an input mask to make the input value to have a currency decimal thru a plugin that you made.

  2. Upon creating or deleting? kintone’s text field, you want to reflect the created/deleted field on the plugin’s side too.

  3. When you input a value in a text field on the plugin’s side, you want to add the input value to a text field on the kintone’s side; vice versa, when you input a value in the kintone’s field, you want it to appear on the plugin’s side.

 

The question is, you are trying to accomplish 3. with javascript, but it’s not working.

Is this correct?

Thank you

Hi Yuzo Arai !

My plugin worked, but Customize JavaScript file i using for caculate 2 field not work.

Thank you 

if i remove plugin, Customize js file worked, but i add plugin, it not work

Hi Chinh Huynh,

I have created a new Kintone app with the coding you provided with us.

As the current issue, it seems that when you specify a numeric field to contain a comma with the plug-in, changing the specified field does not appear to reflect the results of the JS calculation. 

For example, I set the plug-in to contain a comma in the number2 and tried as below.

 1. At Number1 field, enter 10,000
 2. At Number2 field, enter 10,000
 3. Change the focus from the Number2
  => As a result, Number2 will contain a comma, but Number3(Calculation of Number1 and Number2) is not updated.

As this situation,

  1. The change event that was set in the Init () function of the plug-in side “App.record.create.show” works first (line 79)

  2. Add a comma to number2 and run Kintone.app.record.set ()
    => As a result, Number3 remains old information (line 84)

  3. Change events in JS work

  4. Event returns in JS 

5.Execute the event return after processing 2 (line 85)
  =>As a result, 4.is overwritten. 

※The processing of the 1, 2 and 5 are carried out on the plug-in side.

There seems necessary to fix the processing of the plug-in side. Therefore you might want to check the processing once again.

Hi Junko Werner,

Thank you for investigation.

I try very much solutions for my plugin. But it not worked.

Are you have better idea suggest for me ?

 

chính huỳnh

Please could you give us more details on _ what did not work _. It will help community members understand the issue more quickly and more in-depth.

What did you try, what was the expected outcome, and what was the result? What errors did you encounter?

Do the errors appear in the console, or are you encountering errors in packaging plug-ins? etc

chính huỳnh do you have any update for this issue?