Expand my Community achievements bar.

SOLVED

Hide a Page when all fields are empty.

Avatar

Level 3

Hi everyone,

I'm currently using LiveCycle Designer ES 8.1, I must also point out that I'm new in this Adobe area.

I need your help. I want to check if all fields are empty, if so I want to hide that specific page, using JavaScript.

Please note all my fields are read only. These fields will are populated using XML data.

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

There are commands that will give you all of the objects on a particular page .....then you can cycle through them (one at a time) to see if they are populated. I think you might run into issue when you try to hide the page that your are currently on .....it would be an interesting exercise though. If you send the form and data file to LiveCycle8@gmail.com I will give it a go when I get a chance.

Paul

View solution in original post

3 Replies

Avatar

Level 1

I believe you should ask your question "in reverse mode", for me, it sounds easier this way. What I mean, is "How to display a new page, when I import data?". You should work with subforms, and whenever your imported XML data contains the necesary elements, your subform should appear in new page...

Avatar

Level 3

I hear you, sounds similar.But I'm still stuck

Avatar

Correct answer by
Former Community Member

There are commands that will give you all of the objects on a particular page .....then you can cycle through them (one at a time) to see if they are populated. I think you might run into issue when you try to hide the page that your are currently on .....it would be an interesting exercise though. If you send the form and data file to LiveCycle8@gmail.com I will give it a go when I get a chance.

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