You'd need to replace the layout text with one or more calculation fields that are empty if the portal is empty--same basic logic as your conditional format expression, but as part of an If function in the calculation. Then these calculation fields can be set to slide up and to resize the enclosing part.
Key facts about sliding layout objects:
- It's only visible in preview mode and when you print/save as PDF...
- Sliding fields will shrink but not expand.
- All layout objects below and in the same layout part as the slide/resize field need to also be set to slide up and resize.
- Objects in headers and footers will not slide.
- Portals will shrink/slide to fit the number of rows of records, but fields within the portal row will not shrink/slide.
- Fields will slide up only if Top alignment is specified for it and will slide left only if Left alignment is specified.
- Consistent side borders are difficult to achieve with sliding fields.
I've never used calculation fields. Can you break that down for me? I need text headings when there is data in the portal and no headings when there is no data in the portal.
Open Manage | Database | Fields and select your Layout's associated table.
Enter a new field name, select calcualtion as the field type and click Create.
Create a calculation similar to:
If ( not IsEmpty ( dailylog_turbidity_environmental::NeverEmptyField ) ; List ( "Daily" ; "Sequence" ) )
Select Text from the Result Type drop down.
Select a field that is never empty of data--such as the foreign key field used in the portal relationship in place of "neverEmptyField".
This calculation field will be empty when the portal is empty and display:
when it is not.
This assumes that your portal is not a filtered portal. If it is a filtered portal, you'd need to replicate the filter's logic in this if function.
That sounds good, but I have one problem before I can do it.
Under Manage, Database can't be selected. Only Security, Value Lists, Layouts, and Scripts can be. Is there a reason for this?
Could be you don't have the database open with a full access account.
Maybe a custom menu has disabled it.
Maybe there is a script running that is currently paused.
Maybe your file is damaged
All of these are just guesses on my part.
I switched to the file's admin account, so now I'm good to go.
However, this keeps popping up as I'm trying to create the calculation.
I feel like I'm so close though!
I used List as a quick way to get text to appear in two lines. If the text to be returned is all in a single line, you don't need the list function and can use this expression instead:
If ( Not IsEmpty ( dailylog_turbidity_environmental::Sample_ID ) ; "Environmental Turbidity Values" )