on 2023 Jun 15 1:14 PM
Hi All
I have a Form showing Salary value = 45,000,000.00
However while passing the above value to Odata Function Imports using below code, Odata is rejecting it because of commas in value.
<Input id="salary_id" visible="true" width="50%" enabled="false" value="{path: 'Salary', type: 'sap.ui.model.odata.type.Decimal', constraints:{ precision:15, scale:2 }}"/>
amount = this.byId("salary_id").getValue();
system is not accepting the value 45,000,000.00 but accepting 45000000.00 i.e. without any comma. User requirement is to display commas in all amount fields but Odata Function is not accepting it.
Request clarification before answering.
Found below solution to remove commas from a formatted amount field of XML View.
salary = this.byId("salary_id").getValue().replace(/,/g, ""),
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is always the worst solution to go to ui control to get data
use binding please, then you will have proper data in the model for processing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
29 | |
9 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.