My form has a Final Total Approved Reimbursement field that should show the lesser of three fields but I cannot get it to work. I've looked at it so long I can find no reason for it not to. It should be simple enough (that's probably the reason I don't see the error). Here's the code:
if (Number(bottom.tblCourse.row8.reimbApproved.rawValue) < Number(bottom.tblReimbRcvd.row3.cost2Dec.rawValue))
{
this.rawValue = (bottom.tblCourse.row8.reimbApproved.rawValue);
}
else if (Number(bottom.tblCourse.row9.proRatedApproved.rawValue < Number(bottom.tblReimbRcvd.row3.cost2Dec.rawValue))
{
this.rawValue = (bottom.tblCourse.row9.proRatedApproved.rawValue);
}
else {
this.rawValue = (bottom.tblReimbRcvd.row3.cost2Dec.rawValue);
}
Solved! Go to Solution.
Views
Replies
Total Likes
Please use the below-modified script, which worked for me.
if (tblCourse.row8.reimbApproved.rawValue < tblReimbRcvd.row3.cost2Dec.rawValue)
{
this.rawValue = tblCourse.row8.reimbApproved.rawValue;
}
else if (tblCourse.row9.proRatedApproved.rawValue < tblReimbRcvd.row3.cost2Dec.rawValue)
{
this.rawValue = tblCourse.row9.proRatedApproved.rawValue;
}
else {
this.rawValue = tblReimbRcvd.row3.cost2Dec.rawValue;
}
Please check the somExpression of fields if they are resolving properly. This may be the reason or you can share your form @ (vkatoch07@gmail.com), I'll have a look.
Please use the below-modified script, which worked for me.
if (tblCourse.row8.reimbApproved.rawValue < tblReimbRcvd.row3.cost2Dec.rawValue)
{
this.rawValue = tblCourse.row8.reimbApproved.rawValue;
}
else if (tblCourse.row9.proRatedApproved.rawValue < tblReimbRcvd.row3.cost2Dec.rawValue)
{
this.rawValue = tblCourse.row9.proRatedApproved.rawValue;
}
else {
this.rawValue = tblReimbRcvd.row3.cost2Dec.rawValue;
}
Unfortunately it is not working for me....In this instance $960 should be the "remaining FY Tuition Allowance.
The script is working now, you can modify the logic as per your requirement
Some of the fields that are used in the formula have formulas of their own. Could this be causing an issue?
https://drive.google.com/file/d/1UFOPBl5Uz2AJ-a1ZARkc8fmnL9cU9jB4/view?usp=sharing
Yes, calculations in other fields can cause issues.
Can you possibly take a look and see if you can pinpoint what can be causing the issue? I'm not even sure how/where to start.
Views
Replies
Total Likes
@Vijay_Katoch Did you find the suggestions from Vijay helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Hello,
Here is what I am seeing:
1. You are missing a ')' here: else if (Number(bottom.tblCourse.row9.proRatedApproved.rawValue) < Number(bottom.tblReimbRcvd.row3.cost2Dec.rawValue))
2. You have a null variable error in your script object ColorFieldValidation, line 49:
TypeError: oOriginalNode is null
49:Doc:Init