Hello - I would appreciate any help on this please. I would like to be able to do the following run-time implementation of an Input Mask of a Plain Text attribute and Format/Max Value of a Number attribute.
For instance, I have 3 different government agencies. Each have a different format for its Contract Number. So in each agency setup record we have an attribute containing their Input Mask. I made the Contract Number attribute a Plain Text with Max Length of 20.
1. Agency #1: LL-000-00a
2. Agency #2: 00-AAAAAA
3. Agency #3: 00000-00
Also each agency allows a different value and decimal place for a given quantity entered. I made this Quantity attribute a Number with a Format of ###.### or should it be something else:
1. Agency #1: Max value = 8.0 - allow only 1 decimal place
2. Agency #2: Max value = 40.00 - allow only 2 decimal places
3. Agency #3: Max value = 99.999 - allow only 3 decimal places
How would this be implemented? Input Mask pattern as well as the Number Format are looked up when a record is added or edited based on the Agency that is receiving the entered information?
Thanks for your help.
Arnold
Runtime setting for restricting entry by user
-
- Posts: 24
- Joined: Mon Apr 09, 2018 11:58 pm
- Location: San Francisco Bay Area - California - USA
Runtime setting for restricting entry by user
Last edited by Arnold on Mon Dec 10, 2018 6:02 pm, edited 1 time in total.
-
- Posts: 2399
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Runtime setting for restricting entry by user
Behind the scenes the data in the Text attribute and the Numeric attribute can be the same. The Mask and the Decimal places are only relevant for display to the user.
As we cannot dynamically set the Mask and the decimal places (yet) I would solve as follows....
In the Agency BO you have a MaskType (A, B or C) and you have a DecimalPlacesType (A, B or C)
You can make this User changeable or Admin changable.
Then have 4 Attributes for each
AgencyString TEXT 20 no mask (this holds the RAW value)
AgencyStringTypeA TEXT 20 Mask LL-000-00a
AgencyStringTypeB TEXT 20 Mask 00-AAAAAA
AgencyStringTypeC TEXT 20 Mask 00000-00
Similarly for the Number...
AgencyNumber NUMBER n (this holds the RAW value)
AgencyNumberTypeA Number #.0
AgencyNumberTypeB Number #.00
AgencyNumberTypeC Number #.000
Then you have the following BO Rules
Rule: READ PROTECT Correct Strings
IF AgencyMakType='A' THEN
READ PROTECT AgencyStringTypeB
READ PROTECT AgencyStringTypeC
ELSE
IF AgencyMakType='B' THEN
READ PROTECT AgencyStringTypeA
READ PROTECT AgencyStringTypeC
ELSE
IF AgencyMakType='C' THEN
READ PROTECT AgencyStringTypeA
READ PROTECT AgencyStringTypeB
Rule: Set Raw String
IF Agency.MaskType='A' THEN
AgencyString=AgencyStringA
ELSE
IF Agency.MaskType='B' THEN
AgencyString=AgencyStringB
ELSE
IF Agency.MaskType='C' THEN
AgencyString=AgencyStringC
And then use a similar methodology for the Numeric also.
Then elsewhere in the app.... any calcs on the Numeric or rules that use the string , use the RAW values.
As we cannot dynamically set the Mask and the decimal places (yet) I would solve as follows....
In the Agency BO you have a MaskType (A, B or C) and you have a DecimalPlacesType (A, B or C)
You can make this User changeable or Admin changable.
Then have 4 Attributes for each
AgencyString TEXT 20 no mask (this holds the RAW value)
AgencyStringTypeA TEXT 20 Mask LL-000-00a
AgencyStringTypeB TEXT 20 Mask 00-AAAAAA
AgencyStringTypeC TEXT 20 Mask 00000-00
Similarly for the Number...
AgencyNumber NUMBER n (this holds the RAW value)
AgencyNumberTypeA Number #.0
AgencyNumberTypeB Number #.00
AgencyNumberTypeC Number #.000
Then you have the following BO Rules
Rule: READ PROTECT Correct Strings
IF AgencyMakType='A' THEN
READ PROTECT AgencyStringTypeB
READ PROTECT AgencyStringTypeC
ELSE
IF AgencyMakType='B' THEN
READ PROTECT AgencyStringTypeA
READ PROTECT AgencyStringTypeC
ELSE
IF AgencyMakType='C' THEN
READ PROTECT AgencyStringTypeA
READ PROTECT AgencyStringTypeB
Rule: Set Raw String
IF Agency.MaskType='A' THEN
AgencyString=AgencyStringA
ELSE
IF Agency.MaskType='B' THEN
AgencyString=AgencyStringB
ELSE
IF Agency.MaskType='C' THEN
AgencyString=AgencyStringC
And then use a similar methodology for the Numeric also.
Then elsewhere in the app.... any calcs on the Numeric or rules that use the string , use the RAW values.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 24
- Joined: Mon Apr 09, 2018 11:58 pm
- Location: San Francisco Bay Area - California - USA
Re: Runtime setting for restricting entry by user
Thanks Mark - appreciate that solutions that you charted out. I need to think about this and do a little test app to experiment.
I should two types of attributes but there are more than two attributes that I will be doing this for - I will count but even if it is only 10 attributes - I was hoping for some method call that I can swap out the default input mask or format with a defined one in the agency or company configuration table. I am anticipating over a hundred agencies not just 3 as in my example.
I will study it after I get some sleep!
Thanks again
Arnold
I should two types of attributes but there are more than two attributes that I will be doing this for - I will count but even if it is only 10 attributes - I was hoping for some method call that I can swap out the default input mask or format with a defined one in the agency or company configuration table. I am anticipating over a hundred agencies not just 3 as in my example.
I will study it after I get some sleep!
Thanks again
Arnold
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Runtime setting for restricting entry by user
This can probably be achieved with a simple Javascript that would read the value of the attribute storing the mask and set it into the required attribute
Aware IM Support Team
Re: Runtime setting for restricting entry by user
This would be a very desirable function. I can see many applications for it.
So, we could create an Agency preferences table and then call a function, JS or AwareIM or ? that could dynamically set the attribute properties to our Agency preference ?
I think this would be a high value function. I know it would be for me.
So, we could create an Agency preferences table and then call a function, JS or AwareIM or ? that could dynamically set the attribute properties to our Agency preference ?
I think this would be a high value function. I know it would be for me.
Re: Runtime setting for restricting entry by user
Yes, it could be done with "simple" JS.
But there really needs to be modification to this Dialog box: Adding a section similar to this: would allow the Input Mask to easily be derived from a lookup table.
Issue solved.
But there really needs to be modification to this Dialog box: Adding a section similar to this: would allow the Input Mask to easily be derived from a lookup table.
Issue solved.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 24
- Joined: Mon Apr 09, 2018 11:58 pm
- Location: San Francisco Bay Area - California - USA
Re: Runtime setting for restricting entry by user
Hi Jaymer!
Thanks for your thoughts on this - hope it is something easy enough for Vlad to enhance the Input Mask dialog -- what about the Number Format too? Hoping there is more than just me that could benefit from this need for Vlad to add it to his list.
Glad to see you are so active in the forums like you were at the the conference with your questions and solutions.
Have a super Happy Thanksgiving Jaymer and all!
Arnold
Thanks for your thoughts on this - hope it is something easy enough for Vlad to enhance the Input Mask dialog -- what about the Number Format too? Hoping there is more than just me that could benefit from this need for Vlad to add it to his list.
Glad to see you are so active in the forums like you were at the the conference with your questions and solutions.
Have a super Happy Thanksgiving Jaymer and all!
Arnold
-
- Posts: 1457
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Runtime setting for restricting entry by user
Dynamic control of input masks would be a really helpful additions.
International phone numbers for example.
Barcodes (ISBN has two formats 10 & 13 characters long)
Bank routing numbers / sort codes / BSB.
If it could be dynamically picked from a database table even better.
International phone numbers for example.
Barcodes (ISBN has two formats 10 & 13 characters long)
Bank routing numbers / sort codes / BSB.
If it could be dynamically picked from a database table even better.
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Runtime setting for restricting entry by user
Like I said, a simple script would do the job - both for input masks, number formats or any similar requests. This is what you need to do:
1) Put an attribute that stores the format or mask on a form (it has to be first)
2) Make it invisible with this script:
markup.css ("display", "none");
3) Put the attribute that uses the mask or format on the form
4) Write a script for this attribute to get the value of the first attribute and set it as Kendo UI setting for the current attribute
If you want us to do it we can for a small fee ($100)
1) Put an attribute that stores the format or mask on a form (it has to be first)
2) Make it invisible with this script:
markup.css ("display", "none");
3) Put the attribute that uses the mask or format on the form
4) Write a script for this attribute to get the value of the first attribute and set it as Kendo UI setting for the current attribute
If you want us to do it we can for a small fee ($100)
Aware IM Support Team
-
- Posts: 24
- Joined: Mon Apr 09, 2018 11:58 pm
- Location: San Francisco Bay Area - California - USA
Re: Runtime setting for restricting entry by user
Sure I would love that - but this is for the Input Mask but what about the Number Format also (max value [zero equals no max] and decimal places) - shall we confirm by email? Thanks Arnold
-
- Posts: 24
- Joined: Mon Apr 09, 2018 11:58 pm
- Location: San Francisco Bay Area - California - USA
Re: Runtime setting for restricting entry by user
sorry i was not focused on Number Format that you mentioned. Thanks I got too excited. Arnold
Re: Runtime setting for restricting entry by user
The ability for the end user to configure input masks for a specific attribute would be great. Example, I have an EMR Prefix ID and Medical Record Number format that can vary for different clients. Storing the mask in a client specific object that will override the configured attribute would be a major benefit,
Robert Sanford
AwareIM V 8.2/Windows 2012 Server/MySQL
AwareIM V 8.2/Windows 2012 Server/MySQL