Expand my Community achievements bar.

SOLVED

Why doesn't subform presence event go to invisible and/or hidden?

Avatar

Level 1

The program goes to the appropriate sections, but the presence event does not work?  Where am I going wrong?  I also have tried to set the property to invisible in the workspace and then just turn it on through scripting.  That approach is not working either.

form1::initialize - (JavaScript, client)
//xfa.host.messageBox is used to determine if this section is being processed.
      xfa.host.messageBox("We are initializing");
//The intent is to make these parts of the form invisible.  The first is a subform, the second a text field. 
      form1.sfPage1.sfPresidency.presence = "invisible";
      form1.sfPage1.sfProposedCalling.TextField1.presence = "hidden";
//In neither case does the presence of the object go invisible or hidden.

form1.sfPage1.sfProposedCalling.Organization::change - (JavaScript, client)
      switch(xfa.event.newText){
       case "EQ":

// A message is to appear to show that the program has reached  this section.
// It does reach this section.
             xfa.host.messageBox("This is the EQ subForm");
             form1.sfPage1.sfPresidency.presence = "visible";
             form1.sfPage1.sfProposedCalling.TextField1.presence = "visible";
// The appropriate messages show up, but neither of the presence events work.
       break;
       default:
             xfa.host.messageBox("Default");  
       break;
}

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Have you saved the form as a dynamic PDF?

View solution in original post

3 Replies

Avatar

Correct answer by
Former Community Member

Have you saved the form as a dynamic PDF?

Avatar

Level 1

Steve,

Thank you for bringing me back to the basics. I don't know why I missed

such a simple thing, but I did. Things work fine now.

Allen Oyler

President

Onsite HR Services, Inc.

Phone: 503.680.7444

Email: allen@onsite-hr.com

Avatar

Former Community Member

You are not alone. I have pulled many hairs from my receding hairline more than once on this same issue.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----