Array widgets calculations

292 views
Skip to first unread message

Somjit Banerjee

unread,
Feb 18, 2016, 6:23:03 AM2/18/16
to Fujitsu RunMyProcess Developer Community
Hi Team,

I am using three array widgets, where the calcullation of two field of different array widgets is being popullated in the thrid array widget, below is the code which i am using,

var t=RMPApplication.get("default_usd_value");
var s = parseFloat([[my_total_amount_in_original_currency.total_amt_one[P_index] ]]*[[my_total_usd_after_conversion.usd_exchange_rate_used[P_index] ]]);

var m=[[my_array.select_currency[P_index]]]
if(m=="MYR")
{
id_my_summary.id_total_foreign_currency_in_usd[ P_index ].setValue("" + t);
}
{
else
{
id_my_summary.id_total_foreign_currency_in_usd[ P_index ].setValue("" + s);
}

but for the final widget where the value needs to be popullated, nothing is appearing, can you please tell me where i am doing wrong in the code.

Regards
Somjit

Murali

unread,
Feb 19, 2016, 5:13:32 AM2/19/16
to Fujitsu RunMyProcess Developer Community, somjit-ban...@lafargeholcim.com
Hi Somjit,

Below code is logically good and hope you found the syntax issue and resolved the problem already.
There was an extra open braces in your code(highlighted below). Please debug with alert statements if still facing the problems.

if (condition) {
    block of code to be executed if the condition is true
} else {
    block of code to be executed if the condition is false
}

Regards,
Murali

Somjit Baner-Jee

unread,
Feb 19, 2016, 5:38:10 AM2/19/16
to Murali, Fujitsu RunMyProcess Developer Community
Hi Murali,

Yes the issue has been resolved already, there were also some minor changes in the code, thanks for the reply and suggestion. 

Reagrds,
--

REGARDS,


Somjit Banerjee | RMP Developer 

IT Asia Pacific (ITAP), Lafarge Asia Sdn Bhd.

Level 2, Wisma Lafarge, 2 Jalan Kilang,

46050 Petaling Jaya, Selangor, Malaysia.

Email: somjit-baner.jee.ext@lafargeholcim.com

Mobile: +601126371680

Office: +603 7787 4982  | Fax:+603 7962 3416


Reply all
Reply to author
Forward
0 new messages