12 hours ago12 hr I may have described this quite clumsily in the post title, but I'm very surprised that it is proving so hard to solve.On one of the layouts in my database, there is a text field which is used for notes relating to that invoice/order. Because it appears in the header of a list layout, I've got limited space available.What I'm finding is that the users put a wide variety of information into this field. Sometimes it's just a sentence or two, but often it can be lots of text copied from an email, or a list of accessories required.If the content spills over the available space, then there's no indication that this has happened. So a user could quite easily missed some items off the end of a list, etc. I had assumed that it would be fairly simple to add a warning of some kind, alerting users to the hidden information. But it seems to be really difficult to get anything to work.Get(layoutobjectattribute) returns the complete contents of the field, irrespective of whether it is displayed or not. I found that several AI chatbots would hallucinate the existence of a "contentHeight" attribute which Get(layoutobjectattribute) doesn't support.Other methods that I can find seem to depend on trying to count lines somehow. But even with a monotype font, it doesn't look like they will get an accurate number because of the text wrapping. (Counting the number of characters that will fit in the width of the text box doesn't work because of this)The only workaround that I can think of is replacing the field with a text calculation, something like OriginalNotesField & "**END**"so that users know that if they don't see "**END**" to go looking for more notes. However that strikes me as being a bit of a kludge, and I'd prefer to have other interface elements triggered by the situation, e.g. having a button appear to go directly to another layout that displays the notes in full.It does seem like this is just a fundamental limitation in the way Filemaker renders layouts. Or is there something I'm missing? Edited 12 hours ago12 hr by Angus McKinnon
5 hours ago5 hr Indeed, there is no simple way to do this, at least not a reliable one. As you have noticed, even with a monospaced font you can only count hard line breaks, not the actual lines.Perhaps in your case you could use a web viewer to display the text? Unlike a text field, a web viewer will show a scroll bar when there is more text to view.To get an actual warning (i.e. a layout object that would show only when there is hidden text that overflows beyond the field's height) you would need to do what I suggested here:https://fmforums.com/topic/110259-wrap-around-ellipsis/#findComment-492411
Create an account or sign in to comment