cancel
Showing results for 
Search instead for 
Did you mean: 

Hide/Use a page based on country

Former Member
0 Kudos

I apologize in advance if this has been covered, but I have been searching and haven't seen what I need.

We have created a modified version of the travel expense form, and have added a cover sheet and summary page to the process before the SAP delivered detail prints. The second page, the summary, is landscape while the other pages are portrait.

We are now going to be handling the travel processing for our mexican divisions, and they have different requirements for the summary, which include the page being portrait, not landscape as it is currently.

I was thinking I could develop another page in portrait, with the fields they require, but I would have to use country to determine which page to hide, and which one to use. How can I use the employee's country to determine which page to display?

I saw something on the boards about using formcalc to hide items, but can it be done for a whole page?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

you need to do a little scripting. You need to have both pages created (to switch between them) and the country of the employee in the variable. Next you will write a script (in some useful event, like initialization or layoutReady would suit your needs) which will check the variable value (at runtime) and hide one and show the second page or vice versa.

Check the presence manipulation here in the forum or in the guide here:

http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_ba...

Regards Otto

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you for the resource.

The document mentions hidden is not available for master pages.

When this was originally developed, the programmer put pages Cover and Summary under the drop down (Master Pages) under the Hierarchy tab. Aon the same level as (Master Pages) I find items CoverSheet and US_Summary. Am I to connect my script to Summary under (Master Pages) or to US_Summary? The Summary is the item with the landscape orientation. US_Summary has no orientation.

Sorry if this is a bit rudimentary, but I am left modifying this without much knowledge of the product.

This is the code I entered in ready:layout for US_Summary


----- data.US_Summary::ready:layout - (FormCalc, client) -------------------------------------------

if ( $record.COVERSHEET.C_HEADER.CNTRY eq "Mexico" ) then
this.presence = "hidden"
endif

Edited by: Ed Left on May 7, 2010 5:43 PM

OttoGold
Active Contributor
0 Kudos

The document mentions hidden is not available for master pages.

You don´t need to work with master pages. You just need to hide the content, when the content is hidden then the master page has no reason to appear in the output, I though that is clear and doesn´t have to be mentioned.

If you like formCalc, the guide is here: http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

Regards Otto

Former Member
0 Kudos

I have all of the context hidden, but am displaying a blank page, instead of no page.

I feel I am close, but need a little more assistance.

Edited by: Ed Left on May 7, 2010 9:30 PM

OttoGold
Active Contributor
0 Kudos

I have all of the context hidden, but am displaying a blank page, instead of no page.

I don´t understand. What is hidden context? Why do you display the blank page? Instead of no page? Would would you display "nopage"... Well, maybe you can elaborate a little.

Otto