Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

If Statements

Avatar

Former Community Member

I am new to LiveCycle Designer and am trying to create an ordering document.  On that document, I have a checkbox and a text box.  I only want the text box to be visible if the checkbox is marked.  I have tried several different statements, and nothing seems to work.  I run the check on the statement and don't get any errors.  Yet, when I preview the form, it doesn't work.  The last statement I tried was in FormCalc and looked like this:  if (Fire.rawValue == 1) then FireWording.presence = "visible" else FireWording.presence = "hidden" endif.  I put this statement on the Exit, Click, and Change event, but none of them worked.  Can anyone tell me how I can get this to work?  Any assistance you can provide would be greatly appreciated.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Did you save the form as a dynamic form?When you save out of Designer you must choose a type of Dynamic PDF.

Paul

View solution in original post

4 Replies

Avatar

Correct answer by
Former Community Member

Did you save the form as a dynamic form?When you save out of Designer you must choose a type of Dynamic PDF.

Paul

Avatar

Former Community Member

The form was not saved as a dynamic form.  I changed that setting and re-saved the form.  However, I

still cannot get the below script to work.

if

(this.rawValue == 1) then

FireWording.presence

= "visible"

else

FireWording.presence

= "hidden"

endif

Avatar

Level 10

Code looks OK.. The issue could be related to referencing the name of the field.

Probably "FireWording" was not resolving to the correct field you want to be hidden or visible.

Thanks

Srini

Avatar

Former Community Member

If you want to send your form to LiveCycle8@gmail.com I will have a look ....make sure to include a description of the issue with the email.

Paul

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] ----