I am new to the product and am testing to see if it will do what I need. So far, I have not been able to get a simple process to work.
I am attempting to conditionally control the appearance of a subform with FormCalc script. I have added script to the ready:form event. The script is very simple:
form1::ready:form - (FormCalc, client)
xfa.host.messageBox(Concat("FlexField36 = ", form1..FlexField36), "Debug", 0)
if (HasValue(form1..FlexField36)) then
form1..Loan2Data.presence = "visible"
if (HasValue(form1..FlexField39)) then
form1..Loan3Data.presence = "visible"
It looks like your object references may be the problem. There is a double fullstop inbetween the "form1" and each object.
Hope that helps,
you can surely use .. to search for a form object.
If you want to start from the root node use always "form" not the name you gave your root node.
Try this in the layoutReady:event.
var Ref = form..FlexField36
$host.messageBox(Concat("FlexField36 = ", Ref), "Debug", 0)
if (HasValue(Ref)) then
form..Loan2Data.presence = "visible"
form..Loan2Data.presence = "invisible"
You learn something new every day - I didn't know the "form.." approach.
Also if there are multiple objects with the same name (but in different subforms), it seems to use the deepest object. Not sure I fully understand the approach yet.
so, I have followed the rabbit a bit further and discovered another place to check. I am using PDFTron to perform the merge and it is taking out the script somehow. No script, no action! Thanks for your help. Off to follow another rabbit...