Am reading data from the database now using FormCalc, and can have differing number of dynamic subforms depending on the number of entries of a particular kind.
I generate the proper number of subforms to match the data, but I can't access the fields in the subform to fill them in.
while (oDataConn.isEOF() == false)do
// Create a new instance and get a reference to it.
var oSPC_1 = form1.SPC_1_Deadline_SF.SPC_1_List._SPC_1_Bldg_Info.addInstance(0)
oSPC_1.BuildingNumber.rawValue = something
oDataConn.next()
endwhile
Gives me an error that the accessor oSPC_1.BuildingNumber.rawValue is unknown.
Any idea what I'm doing wrong, or more likely what I am addressing wrong?
Thanks in advance.
Patrick
Solved! Go to Solution.
Views
Replies
Total Likes
1. try to invoke the JavaScript method written in a Script Object as
scrObjName.jsFunctionName();
if this is not helps,try #2
2. Place your Javascript code in click event of a button (hidden button)
Form your formcalc code write:
btnHidden.execEvent("click")
Hope this atleast will help.
Nith
DISCLAIMER:
========================================================================
"This communication is intended only for the named recipient and others authorized to receive it.
It contains confidential or legally privileged information. If you are not the intended recipient, please notify us immediately, and note that any disclosure, copying, distribution or action you may take in reliance on this communication is strictly prohibited and may be unlawful. Unless indicated otherwise, this communication is not intended, nor should it be taken to create any legal and/or contractual relation or otherwise. Ministry of Finance (MOF) is neither liable for the proper and complete transmission of the communication, nor for any delay in its receipt.
Whilst MOF undertakes all reasonable efforts to screen outgoing e-mails for viruses, it cannot be held liable for any viruses transmitted by this e-mail."
Views
Replies
Total Likes
Can you post your form?
There must be some hierarchical structure issue.
Nith
Views
Replies
Total Likes
Here it is.
Views
Replies
Total Likes
The problem is invalid reference to the field BuildingNumber
The actual field name is BldgNumber
Nith
Views
Replies
Total Likes
Still gives the error about not finding the accessor.
Views
Replies
Total Likes
Surround your code within try catch block and locate the issue. Definitely this time you will not get the error at the same location.
Nith
Views
Replies
Total Likes
Have tried using calculate or validate of a dummy field (just like setting the static names on the master page) in Javascript and it seems to be working a bit better.
It works but only pn the last value. If I have 7 entries, it only sees the 7th one.
Any advice on how toi get the formcalc main portion to call a Javascript event or function.
Thanks,
Patrick
Views
Replies
Total Likes
1. try to invoke the JavaScript method written in a Script Object as
scrObjName.jsFunctionName();
if this is not helps,try #2
2. Place your Javascript code in click event of a button (hidden button)
Form your formcalc code write:
btnHidden.execEvent("click")
Hope this atleast will help.
Nith
DISCLAIMER:
========================================================================
"This communication is intended only for the named recipient and others authorized to receive it.
It contains confidential or legally privileged information. If you are not the intended recipient, please notify us immediately, and note that any disclosure, copying, distribution or action you may take in reliance on this communication is strictly prohibited and may be unlawful. Unless indicated otherwise, this communication is not intended, nor should it be taken to create any legal and/or contractual relation or otherwise. Ministry of Finance (MOF) is neither liable for the proper and complete transmission of the communication, nor for any delay in its receipt.
Whilst MOF undertakes all reasonable efforts to screen outgoing e-mails for viruses, it cannot be held liable for any viruses transmitted by this e-mail."
Views
Replies
Total Likes
execEvent did the trick. Plus making sure all the binding and repeat counts are correct. .
Thanks.
Patrick
Views
Replies
Total Likes