Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Control placement of subform using scripting

Avatar

Level 2

I have a form where I would like to have a subform hidden while the user is entering data, and then reveal during printing.  This I can do (just toggle the presence during the pre/post print scripting areas).

When the document is printed, I also want to control the pagination of the subform to force it to the top of the next page - but only when printing.  If I do this using the palette Object...Pagination...Place (Top of next page), it works, but it creates a large gap when the user is filling out the form on the screen.  I want to control this property with scripting during the "prePrint" stage of processing the form (and then toggle it back "postPrint").

I can't find the right code to do this - anybody know the right code?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

If you make the presence of th esubform hidden instead of invisible it will not be included in the layout hence it will not take up space.

Paul

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

If you make the presence of th esubform hidden instead of invisible it will not be included in the layout hence it will not take up space.

Paul

Avatar

Level 2

I knew this was simpler than I was making it!

I didn't think of the hidden aspect, since I'm currently trying to get everything to work properly.  Thank you!

I'm now making the subform "hidden" as the default, with the pagination set to "Top of Next Page".  When I print, I toggle the presence to "visible" in the prePrint coding area, and then back to "hidden" in the postPrint area.

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