- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 07:17 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 09:36 AM - edited 11-20-2023 09:37 AM
Depending on the field types, you will want to use with "getDecimalValue" (probably) or "getIntValue" to retrieve the value of the fields as numbers and then do your calculation. The problem is parseFloat is tripping up on the space between "10" and "000" and only returning 10 as the result in your example. So (50 * 10) / 100 = 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 09:51 AM - edited 11-20-2023 09:52 AM
The field type should be same for all 3 variable.
u_estimatif ,u_taux_de_r_ussite,u_estimatif_pond_r
add the replace() method and try again.
var valueA = g_form.getValue('u_estimatif').replace(/,/g,'');
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 07:22 AM
Hi @Hicham-dev ,
What's the question here, please explain the issue with script.
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 07:33 AM
Salut @AshishKM Je veux que lors que le champ u_estimatif est modifié, la fonction u_estimatif multiplier par le champ u_taux_de_r_ussite s'exucute et le resulatat s'affiche dans le champ u_estimatif_pond_r.
J'ai reussi avec une businnes Rules mais je n'arrive pas en ClientScript
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 07:48 AM
Are you writing client script on table or catalog client script for any catalog item.
minor update in client script in either case, the client script form has Field Name, select the field "u_estimatif" here and remove the if condition applied on "u_estimatif".
let me know if it works for you
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 08:04 AM