on 06-18-2014 7:30 PM
Hi guys, i´m trying to use a number mask because I want to set a mask from a number field, in other way I don´t want to change the type of the field to text because I expect always numbers and in VC I can´t found the way to validate with regex.
So, the problem is when I set the mask in the value field, it´s turn automatically to read-only, so at runtime the user can´t set a value and then makes the system format it.
How the format thing works in VC !?
Is the right place to use the format functions !?
Any help will be appreciated.
Hi Isaak,
you have to set the currency not IN the input field, but beside the input field you can make a further input field for the currency.
If you want your number without formating of the number you have to use text fields otherwise it will be formated.
My problem is and maybe Talia can help me:
I want to format my table column so, that I see always one decimal place and it should be sortable.
Do you have for this issue any idea?
BR,
Murat Y.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murat,
If the table is populated by a service, you can use the same approach I described in my first reply to Isaac (with data share and the formatting on the map).
In order to define the number of digits after the decimal point, you should use NSTR with .m parameter. In your case you should use .1 in order to show 1 decimal digit.
Number Formatting Mask in Visual Composer:
http://help.sap.com/saphelp_nwce711/helpdata/en/48/a8e149516b35bae10000000a42189d/content.htm
Thanks,
Talia
Hi Murat,
We've looked into it now and the conclusion is that this is the default behavior of WebDynpro Framework.
WebDynpro displays BigDecimals in this way (if it is 3.0, it will display it as 3).
Unfortunately, there is not quick solution for this issue. This is added to our feature request list and we will address this issue according to our capacity and priorities.
Thanks,
Talia
Hi Isaac,
When you set the mask in the value field, it´s turn automatically to read-only.
The reason this happens is since the calculated field you define is
treated as text, because it does not have a matching "real" field in the
data set.
Where does the value of field @FacturaSAP come from?
Does it comes from a service?
If so, you can do the following:
TXT1 (text field)
NUM1 (numeric field)
4. Open Map Data dialog of the mapping line between the output of the service and the share1
5. Define the Assign values of the new fields as following:
TXT1 =NSTR(@FacturaSAP ,"<ANYMASK>")
NUM1 =NVAL(share1@TXT1)
6. Create some UI element (FormView or GridView) using quick link from share1. This UI element will contain the InputField that will be bound to NUM1 and will display the number in the needed formatting.
I attached a screenshot of model example for your reference. There is another mask in the example, but in does not matter in this case.
Hope it helps.
If the value of field @FacturaSAP does not come from a service, please attach a screenshot with the model and brief explanation of the use case.
Thanks,
Talia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Talia, thank you for your great answer, the field @FacturaSAP is an input field that the user enter manually in a view called..."2", then, the user enters the value 400000000, and after that the user could contine to the following views #3 #4 etc, (within a wizard) but if the user return to view #2 the value entered as 400000000 now is represented as 400,000,000 ... all I want is to format this input field to replace the commas.
The other scenario is almost the same but imagine that I want to set the currency in that field, the user in the view #2 set 4000000 and when the user press enter the currency is now set with the proper function mask, or maybe they don´t need to press enter but he navigates to the view #3 #4, and maybe if he returns to view #2 the value 400000 now formatted with the currency.
In your example if I´m understanding, the format functions only can be set inside the mapping !?
tHnks
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.