Hello Community!

 

I have a mask in a interger field, but I need to apply that on the page inizialate because I have record inserted directly to the database.

 

 

Like 0

Like

1 comments

Dear Federico,

 

An input mask helps users with the input by ensuring a predefined format. If you have record inserted directly to the database, you won’t be able to apply the input mask for this record. In order to validate this record, please consider creating a trigger in the database that should be triggered before inserting the record. Please find more information about triggers in the article by the link below:

 

https://www.essentialsql.com/what-is-a-database-trigger/

 

Best regards,

Norton

Show all comments

Hello,

I have found error on page when I try to use 'UsrMultiMaskEdit' to apply mask format to phone numbers. Here I have attached image showing issue:

 

Like 0

Like

1 comments

Hello,

The same question can be found here https://community.bpmonline.com/articles/how-add-input-mask#comment-712… and also Andre had the same error. Please take a look at the solution provided there and double check your configurations.

Best regards,

Oscar

Show all comments
Question

Dear all, anyone knows where, I mean, the menu I must go through to insert this code https://community.bpmonline.com/articles/how-add-input-mask#comment-712… ?

Like 0

Like

5 comments

Hello.

Everything is done in the configuration. The step by step instruction is available below:

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-add-field-…

Best regards,

Matt

Hi Matt, thanks for the info, but actually it's not what I need. I need to create a mask for each time someone adds a phone number, the + xx xx xxxxx-xxxx format is respected. The link you sent me explains how to create an error message if a value is entered into the system, assuming a mask has already been created.

Andre VItal,

You are correct, it does talk about that. But it also talks about adding the validation for the date field, which is relatively close to what you can achieve for the phone number. Moreover, adding the phone input mask is described in the community Q&A post you have included in this post.

Best regards,

Matt

Matt,

Thanks once more.  Regarding "Moreover, adding the phone input mask is described in the community Q&A post you have included in this post" you are right, but it doesn't explain it properly. I followed all steps and I got not the expected result. There is something missing in the instructions.

Andre VItal,

Hello.

Looks like you did not configure it properly then. Please make sure you have the MultiMaskEdit client module in your system. Also, please check whether you have added the dependency to the correct replacing schema and the correct field. In case you have done everything accordingly and it still does not function as intended you can attach your page schema and properly describe your issue and we will take a look.

Matt

Show all comments

Hello everyone!

I hope you can help me!

I have a"CUIL" field in the employee table and I want to apply the mask. Example: Enter 20352741729 and the mask would be 20-35274172-9.

I must validate that the entry/edition of this field is correct. How can i apply the mask to that field?

I aprreciate your help!

Regards.

Like 0

Like

4 comments

Hello Ezequiel!

There is a pretty universal instruction for adding a field mask. It is originally meant to create a mask for a phone number, but you can adjust it as much as required.

First of all there is a control attached, which allows you to enter information using the array of masks.

To use it you need to add this module to the page dependency and to define section and include in page diff that MultiMaskEdit class and its mask have to be used. 

{
                    "operation": "merge",
                    "name": "MobilePhone",
                    "values": {
                                         "controlConfig": {
                                                             className: "Terrasoft.controls.MultiMaskEdit",
                                                             mask: {
                                                                                 formats: ["+7(999)999-99-99", "+380(99)999-99-99"]
                                                             },
                                                             onBeforePasteFormatValue: TSCCommon.getDigitsFromString
                                         }
                    }
}



You include onBeforePasteFormatValue method only if you want to parse input value before pasting it into control. This method is not required - control will insert only allowed values, however if you, for example, need to parse the string and insert only numeric values - for the mask above, the phone number will be inserted completely, regardless which symbols were used additionally.

The default symbols for mask input are:

{
                    //numbers
                    "9": {
                                         re: "[0-9]"
                    },
                    //cyryllic
                    "к": {
                                         re: "[а-яА-ЯёЁ]"
                    },
                    //latin
                    "l": {
                                         re: "[a-zA-Z]"
                    },
                    //any letter
                    "c": {
                                         re: "[а-яА-ЯёЁa-zA-Z]"
                    },
                    //any letter or number
                    "#": {
                                         re: "[а-яА-ЯёЁA-Za-z0-9]"
                    }
}



You can choose your own symbol for mask template using maskConfig. You indicate the regular expression in re:. Also you need to indicate the symbol, that substitutes the empty values in placeHolderChar. For example you can create a mask that will allow you to enter ISBN codes where 978 are numbers and "0" is a substitute symbol.

{
                    className: 'Terrasoft.controls.MultiMaskEdit',
                    value: {
                                         bindTo: 'ISBN'
                    },
                    mask: {
                                         formats: ["978-0-000-00000-0"]
                    },
                    maskConfig: {
                                         definitions: {
                                                             //numbers
                                                             "0": {
                                                                                 re: "[0-9]"
                                                             },
                                                             placeHolderChar: "_"
                                         }
                    }
}



There is an issue, though, control validation is not passed to the card model, it means that even though the control shows that the value is invalid the card will be saved.

Hope it helps!

Hello Matt!

Thanks you for the response.

Can you said me how import the attached file in the system?. In the "Configuration" section, under "Actions" options, I do click in "Import from file", I select the file MultiMaskEdit.js and I get a error when want load the file. I appreciated your help!

King Regards,

Ezequiel Gómez

 

Hello Matt! How are you? I hope you are well. Any idea? Thank you! Regards!

Matt Watts,

Hello Matt. You know if there is a way to do this but dinamic. For example depends of the country change the format of the mask?

Thanks, 

 

Show all comments