• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 311
  • Last Modified:

Creating a field to combine text and image header

I have a layout that involves headers that are image containers, with text beneath.

If there are 3 sections, each with its own header and text, I want to create a calculation that will hide the header and text if the text field for a specific record is blank.

I tried creating a summary calculation field that combines all the headers and text, but it seems that a sumary field cannot be a combination of image and text at the same time.
0
jarrodprice
Asked:
jarrodprice
  • 7
  • 5
  • 3
1 Solution
 
billmercerCommented:
You can create an unstored calculation field of type container, which evaluates your text field, and either returns the contents of another container field, or nothing.

However, even if the calculation evaluates to nothing, the field itself will still take up space on the layout, so this may not help you.

It would help to know more about your goal. Are you trying to print a report that will have different headers on each page depending on some field? Or is this for browsing/data entry purposes?

0
 
jarrodpriceAuthor Commented:
It is actually a wine tasting note with 3 sections "Background", "Tasting Note" and "Reviews".

Each section has a heading.  Currently 1 field that merges all 3 sections, so that there are no gaps between them.  What I would prefer, is to use an image for each heading stored in a container.  The only one of the three sections that may or may not appear depending on the wine is the reviews section.  Since this appears last, a gap would be fine.
0
 
jarrodpriceAuthor Commented:
Really, what I want is to combine text fields and image containers in the same calculated container.  This does not seem to be possible.
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
lesouefCommented:
a summary works on numerics.
what you need is a concatenation.
mixing up text and images in a container won't work.
and why would you do this? to hide the empty ones? to hide a text field, use a <<merge>> field.
to hide a container, use the printing/silding feature.
(not sure I understand yr pb)
0
 
jarrodpriceAuthor Commented:
Here is my layout:

image container (header)
textfield1

image container 2
textfield2

image container3
textfield3

Each text field is a paragraph to 3 paragraphs long, depending on the record.

How do I concatenate the 3 fields and 3 image containers so that there is no white space between them
0
 
billmercerCommented:
True, you cannot combine text and images in a single field. I don't know how this could be done of any database that would allow this.

If I understand you correctly, you should be able to get this simply by using the Sliding/Printing option as Lesouef mentioned.
Just select the fields, go to the Format menu, and choose the Sliding/Printing option. Then check the option to slide up based on all above. You might also want to check the option to reduce the size of the enclosing part. This causes text boxes with small amounts of text to shrink up, allowing items under it to slide up higher on the page. (This only works for printouts and preview mode, you can't see the effect in browse mode.)
0
 
jarrodpriceAuthor Commented:
I tried this as a first option.  It had absolutely no effect on the printout.

I am amazed that this is such an issue.
0
 
lesouefCommented:
printing/sliding is quite tricky, there may be something wrong in yr layout which prevents the effect to work. can we see the layout?
0
 
jarrodpriceAuthor Commented:
After much fiddling, I got it working, but with some issues.

The image container that I am using for the headers, I wanted to be a repeating calculation field, that also checks for contents for the field below it, and if it is empty, does not appear.

It seems that repeating fields dont slide, and using case in the calculation also prevents sliding.
0
 
billmercerCommented:
Container fields will slide up on the page, but they will not shrink to fit. A case statement in the calculation should not have any effect on sliding or printing, I think there's some other reason for what you're seeing.

Why use a repeating field? Each repetition displayed will occupy space on the layout.

If you want more layout flexibility, you might want to look into using the Web Viewer feature of Fp8.5, and creating HTML tables to display your content.

I'm still not sure we really understand what you want your layout to look like.

0
 
lesouefCommented:
it's normally not jarrodprice's style, leave him a few days, he'll be back I think, but he has so many Qs that he probably looses a few in his (supposed) mess!
0
 
billmercerCommented:
The comment that was accepted here as an answer is not an answer to the question in any way that I can see. Is this a mistake?

0
 
jarrodpriceAuthor Commented:
After Leseufs comment I accepted, I went back and figured out that there was something wrong in my setup.   His was the correct solution.
0
 
billmercerCommented:
> His was the correct solution.

My point is that Lesouef's comment that there may be something wrong is not a solution, it's just a general observation.

You really should select the actual specific comments that provided the answer for you, not just any comment made by that expert.

Part of the value of EE is for other people who come along later looking for answers to similar questions. "There was something wrong with my setup" is not useful information to anyone.

What was the actual problem, and what did you do to fix it?

0
 
jarrodpriceAuthor Commented:
If you look above, I explained what I did right after Leseuf's comments.  I am not sure what the issue is here.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 7
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now